einvoice / EN 16931 / XRechnung rule reference
BR-DEX-03
What this rule means and how to fix it
A SUB INVOICE LINE (BG-DEX-01) must carry exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06) — i.e. its Item must have exactly one cac:ClassifiedTaxCategory. Fires if any sub-line item has 0 or >1.
Eine Sub Invoice Line (BG-DEX-01) muss genau eine "SUB INVOICE LINE VAT INFORMATION" (BG-DEX-06) enthalten.
Deutsche Fassung: Amtlicher KoSIT-Text (official KoSIT assert text).
- Requires
- a SUB INVOICE LINE (BG-DEX-01) must carry exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06) — i.e. its Item must have exactly one cac:ClassifiedTaxCategory. Fires if any sub-line item has 0 or >1.
- Business terms
BG-DEX-01BG-DEX-06- Syntax
- Binds the UBL-2.1 Invoice / CreditNote syntax
- Location (UBL-2.1 path)
cac:SubInvoiceLine/cac:Item- Fix
- Add the required element at `cac:SubInvoiceLine/cac:Item`: a SUB INVOICE LINE (BG-DEX-01) must carry exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06) — i.e. its Item must have exactly one cac:ClassifiedTaxCategory. Fires if any sub-line item has 0 or >1.
- Fix (Deutsch)
- Ergänzen Sie das erforderliche Element bei `cac:SubInvoiceLine/cac:Item`: Eine Sub Invoice Line (BG-DEX-01) muss genau eine "SUB INVOICE LINE VAT INFORMATION" (BG-DEX-06) enthalten.
- Severity
- fatal
- Provenance source
xrechnung-ubl- Provenance assert
Eine Sub Invoice Line (BG-DEX-01) muss genau eine "SUB INVOICE LINE VAT INFORMATION" (BG-DEX-06) enthalten.
The Location above is a UBL-2.1 path, and no UN/CEFACT-CII path for this rule is published here; Fix and Fix (Deutsch), verbatim from remediation_catalog.json and not reworded here; the UBL-2.1 binding of this rule is differentially proven against the official KoSIT XRechnung 2.5.0 (XRechnung 3.0.2) Schematron.
Where to check the fix: paste the corrected invoice into the browser validator at /einvoice/validate/ — it runs this same engine locally in your browser, with no upload, and stops reporting BR-DEX-03 once the edit lands.
Korrektur prüfen: Laden Sie die geänderte Rechnung in den Browser-Validator unter /einvoice/validate/ — er führt dieselbe Engine lokal im Browser aus, ohne Upload, und meldet BR-DEX-03 nicht mehr, sobald die Korrektur greift.
The same invoice, failing and fixed
No vendored test suite ships a labelled example for this rule, so this pair was found rather than written. The engine was run over the vendored instance corpus/xrechnung-testsuite/src/test/business-cases/extension/04.01a-INVOICE_ubl.xml under --profile xrechnung, then re-run over the same file with one mechanical edit applied to one element, over and over, until the edit below changed the verdict: the whole ClassifiedTaxCategory group was deleted, with every element inside it. The page publishes it because the engine reported BR-DEX-03 for the edited document and did not report it for the untouched one.
UBL Invoice (XRechnung extension) — fails
The vendored file around the change, verbatim:
<cac:Item>
<cbc:Name>Demontage Sanitär</cbc:Name>
</cac:Item>
UBL Invoice (XRechnung extension) — passes
The same lines as 04.01a-INVOICE_ubl.xml actually ships them — this block is the fix for the block above:
<cac:Item>
<cbc:Name>Demontage Sanitär</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
What the engine reports for the edited invoice
{
"element": "cac:SubInvoiceLine/cac:Item/cac:ClassifiedTaxCategory",
"field": "cac:SubInvoiceLine/cac:Item/cac:ClassifiedTaxCategory",
"fix_hint": "Add the required element at `cac:SubInvoiceLine/cac:Item`: a SUB INVOICE LINE (BG-DEX-01) must carry exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06) — i.e. its Item must have exactly one cac:ClassifiedTaxCategory. Fires if any sub-line item has 0 or >1.",
"location": "cac:SubInvoiceLine/cac:Item",
"message": "A SUB INVOICE LINE (BG-DEX-01) must contain exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06).",
"rule": "BR-DEX-03",
"severity": "fatal",
"terms": [
"BG-DEX-01",
"BG-DEX-06"
],
"title": "A SUB INVOICE LINE (BG-DEX-01) must carry exactly one SUB INVOICE LINE VAT INFORMATION (BG-DEX-06) — i.e. its Item must have exactly one cac:ClassifiedTaxCategory. Fires if any sub-line item has 0 or >1."
}
Rule ids the engine reports for 04.01a-INVOICE_ubl.xml untouched: none. After the edit, BR-DEX-03 is reported that was not before.
Two honest limits. This is an edit that provokes the rule, not the only one, and it is not a claim about how real exporters break it. And it is the reverse of the fix a reader needs: the passing block is the vendored file's own content, which is what a conformant invoice looks like here.
Reproduce it yourself: take corpus/xrechnung-testsuite/src/test/business-cases/extension/04.01a-INVOICE_ubl.xml from this repository, apply the one edit named above, and run einvoice validate 04.01a-INVOICE_ubl.xml --profile xrechnung --format json, or paste the file into the browser validator, which runs this same engine locally with no upload.
Everything here is free and open source — pick up whatever helps, at your own pace:
- Licensing — free and open source under Apache-2.0 for everyone, including closed-source embedding: use, modify and ship it inside a commercial product with no fee and no license key.
- German remediation (
--lang de) — the German fix for this rule is in the section above; the CLI surfaces it in place of the English message with--lang de. - Quickstart / free on-ramp — the README, a copy-paste CI-gate recipe, and a 5-minute worked walkthrough.