A valid German e-invoice that our validator rejected: the zero-amount header charge

Running einvoice-preflight over KoSIT's 72 valid XRechnung test documents found a false positive in six of them. Here is the cause and the fix.

Tools and projects · 1 min read · Source
einvoicexrechnungvalidationopen-source

KoSIT, the German body behind the XRechnung validator, publishes 72 valid test invoices. Any finding our checker raises on them is a false positive, placeholder data or a style note.

Six of them drew INV-038 ("tax breakdown row names a rate no line uses"). Each carries a header allowance or charge with an amount of 0 in VAT category E. EN 16931 then lists a tax subtotal of 0 taxable and 0 tax for that category, though no invoice line uses it. The arithmetic holds (0 x rate = 0), so the document is fine and our rule was wrong.

The rule now accepts a zero row with no matching line. A non-zero row with no line is still flagged. The JS and Python rules agree, and the KoSIT run drops from six INV-038 files to none. The remaining findings there (placeholder VAT ids and IBANs, a style note on remittance references) are in the README.

Try it free in the browser, with no upload: https://marisstella.app/einvoice-preflight/

More in Tools and projects

All writing · All in this topic · All tools and research