Skip to content

Write no guessed country or tax currency into e-invoices - #624

Open
clstaudt wants to merge 1 commit into
refuse-invoice-without-mandatory-detailsfrom
no-guessed-country-in-e-invoices
Open

clstaudt wants to merge 1 commit into
refuse-invoice-without-mandatory-detailsfrom
no-guessed-country-in-e-invoices

Conversation

@clstaudt

@clstaudt clstaudt commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

An empty or unrecognised country became "DE" in the e-invoice ("Schweiz", "膶esko" and "Brasil" too), and an empty operating country made the tax currency Germany's.

  • Countries: resolve from ISO codes, English names, everyday names (Turkey, UK, England) and names in other languages (Deutschland, 膶esko, Schweiz); nothing fuzzy. An unrecognised one refuses issuing: "Correct the country of Central Services' address: 'Schweitz' is not recognised."
  • Tax currency: comes from the operating country; without one, e-invoicing asks for it. The demo user's operating country is Germany.

馃 Generated with Claude Code

@clstaudt
clstaudt added this pull request to stack #608 October 18, 2026 20:22
A country name that did not resolve to an ISO code went into the
e-invoice as Germany, and so did an empty one: a Swiss client written
"Schweiz" or a Czech one written "膶esko" became German. A fuzzy search
also took close names for other countries, such as North Korea for
"Korea". Without an operating country, VAT was taken to be accounted in
Germany, and a country without a tax model accounted it in euros.

A country now resolves from its ISO code or its name in any language
pycountry knows, or not at all. With an e-invoice profile on, issuing is
refused when the user's or the client's country is not recognised, with
a message that says whose it is, and when no operating country is set.
VAT is accounted in the operating country's tax currency, or in the
country's own currency when it has no tax model. The demo user operates
in Germany, as its contracts assume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clstaudt
clstaudt force-pushed the no-guessed-country-in-e-invoices branch from 9535c01 to 02ea21e Compare October 20, 2026 13:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant