Version v5.12.08
Environment: Self-Hosted, baremetal on Debian 12
Checklist
- Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja?
Not tried – issue seems to be related to e-invoice settings in general. - Have you searched existing issues?
Yes, nothing specific found regarding VAT category/exemption for German “Kleinunternehmerregelung”. - Have you inspected the logs in storage/logs/laravel.log for any errors?
No errors. The invoice is generated, but the resulting XML fails validation.
Describe the bug
I’m trying to generate a compliant e-invoice (XRechnung / EN16931) in Germany using Invoice Ninja v5.12.08.
As a small business under the Kleinunternehmerregelung (§19 UStG), I do not charge VAT, but the e-invoice must contain correct exemption metadata.
I’m validating the exported XML using the official validator for German XRechnungen:
The invoice fails validation with the following 3 critical errors:
Code | Message |
---|---|
BR-Z-01 | One line uses VAT category code Z (Zero rated), but it must be E (Exempt from VAT) instead. |
BR-E-08 | VAT breakdown (BasisAmount ) is 0.00, but it should equal the net line total when VAT is exempt. |
BR-CL-22 | ExemptionReasonCode value (e.g. VATNOTREG ) is not a valid CEF VATEX code. It must be something like VATEX-DE-509 . |
Steps To Reproduce
- Create an invoice with 0% tax as a self-hosted user under small business exemption rules in Germany.
- Export the e-invoice XML via Invoice Ninja.
- Validate the file on https://erechnungsvalidator.service-bw.de/
Expected Behavior
The XML should correctly reflect the following:
- VAT Category Code: E (Exempt from VAT)
- Correct
BasisAmount
(equal to line net total, not 0) - Exemption reason code:
VATEX-DE-509
(not genericVATNOTREG
)
Additional context
This is required for legally compliant invoicing under XRechnung rules in Germany. I would like to know:
- Where in the UI and/or product settings can I configure:
- that all taxes are applied per line (not invoice total)?
- the correct VAT category code (E)?
- the exemption reason code like
VATEX-DE-509
?
I do not want to manually edit XML after generation – it should be produced correctly by Invoice Ninja.
Logs
No errors in Laravel logs. Invoice is generated successfully.