Skip to content

Render German tax ID as unbroken USt-IdNr. - #139

Merged
methodofaction merged 1 commit into
mainfrom
de-tax-id
Aug 6, 2026
Merged

Render German tax ID as unbroken USt-IdNr.#139
methodofaction merged 1 commit into
mainfrom
de-tax-id

Conversation

@methodofaction

Copy link
Copy Markdown
Contributor

Summary

German VAT identification numbers were rendered as TIN: (DE) 111111125, which has two problems:

  • The DE prefix is an integral part of the USt-IdNr. — the canonical form is DE111111125, and the split/parenthesized rendering breaks copy-paste into VIES or other validation lookups.
  • The generic label (TIN / Umsatzsteuer) is ambiguous for German recipients, who could mistake the value for the Finanzamt-issued Steuernummer.

German tax IDs now render as USt-IdNr.: DE111111125.

Changes

  • Add DEUSt-IdNr. to the taxIDLabel switch in components/org/party.templ.
  • Add a taxIDCodeIncludesCountry helper: when the country prefix is part of the identifier, it is prepended to the code and the parenthesized country is dropped. Currently only enabled for DE, but easy to extend to other EU VAT IDs.
  • Add a tax_id_no_country format string to all locales.
  • Regenerate templ output and example HTML files.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates how German VAT IDs (USt-IdNr.) are labeled and formatted in rendered documents so the DE prefix is included in the identifier (no parenthesized country), improving clarity and copy/paste usability.

Changes:

  • Render German tax IDs with the label USt-IdNr. instead of the generic TIN.
  • Introduce a tax_id_no_country i18n format string and a taxIDCodeIncludesCountry helper to drop the parenthesized country when the prefix is part of the code.
  • Regenerate templ output and update example HTML outputs to reflect the new formatting.

Reviewed changes

Copilot reviewed 16 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
locales/ar/app.yml Adds tax_id_no_country translation format.
locales/ca/app.yml Adds tax_id_no_country translation format.
locales/da/app.yml Adds tax_id_no_country translation format.
locales/de/app.yml Adds tax_id_no_country translation format.
locales/el/app.yml Adds tax_id_no_country translation format.
locales/en/app.yml Adds tax_id_no_country translation format.
locales/es/app.yml Adds tax_id_no_country translation format.
locales/eu/app.yml Adds tax_id_no_country translation format.
locales/fr/app.yml Adds tax_id_no_country translation format.
locales/gl/app.yml Adds tax_id_no_country translation format.
locales/it/app.yml Adds tax_id_no_country translation format.
locales/nl/app.yml Adds tax_id_no_country translation format.
locales/no/app.yml Adds tax_id_no_country translation format.
locales/pl/app.yml Adds tax_id_no_country translation format.
locales/pt/app.yml Adds tax_id_no_country translation format.
components/org/party.templ Adjusts tax ID label/formatting logic and adds DE → USt-IdNr. mapping + helper.
components/org/party_templ.go Regenerated templ output reflecting the updated tax ID rendering logic.
examples/out/de-invoice.html Updates example output to show USt-IdNr.: DE… formatting.
examples/out/de-choruspro-invoice.html Updates example output to show USt-IdNr.: DE… formatting.
examples/out/fr-ctc-invoice-b2bint.html Updates example output to show USt-IdNr.: DE… formatting.
Files not reviewed (1)
  • components/org/party_templ.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@methodofaction
methodofaction merged commit 814d963 into main Aug 6, 2026
3 checks passed
@methodofaction
methodofaction deleted the de-tax-id branch August 6, 2026 13:33
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.

3 participants