einvoice / EN 16931 / XRechnung rule reference
BR-DE-CVD-04
So beheben Sie den Fehler
Ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien enthalten.
Deutsche Fassung: Amtlicher KoSIT-Text (official KoSIT assert text).
In a CVD invoice, an 'Item classification identifier' (BT-158) with scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3 (normalize-space comparison, per the official test).
- Requires
- in a CVD invoice, an 'Item classification identifier' (BT-158) with scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3 (normalize-space comparison, per the official test).
- Business terms
BT-158- Syntax
- Binds the UBL-2.1 Invoice / CreditNote syntax and the UN/CEFACT-CII syntax
- Location (UBL-2.1 path)
/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode- Fix (Deutsch)
- Ergänzen Sie das erforderliche Element bei `/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode`: Ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien enthalten.
- Fix
- Add the required element at `/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode`: in a CVD invoice, an 'Item classification identifier' (BT-158) with scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3 (normalize-space comparison, per the official test).
- Severity
- fatal
- Provenance source
xrechnung-ubl- Provenance assert
Ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien 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 UN/CEFACT-CII binding of this rule is differentially proven against the official KoSIT XRechnung 2.5.0 (XRechnung 3.0.2) Schematron.
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-DE-CVD-04 nicht mehr, sobald die Korrektur greift.
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-DE-CVD-04 once the edit lands.
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/technical-cases/cvd/02.01a-cvd_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 text content of ItemClassificationCode was deleted, leaving the element present but empty. The page publishes it because the engine reported BR-DE-CVD-04 for the edited document and did not report it for the untouched one.
UBL Invoice (CVD profile) — fails
The vendored file around the change, verbatim:
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CVD"></cbc:ItemClassificationCode>
</cac:CommodityClassification>
UBL Invoice (CVD profile) — passes
The same lines as 02.01a-cvd_INVOICE_ubl.xml actually ships them — this block is the fix for the block above:
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CVD">M2</cbc:ItemClassificationCode>
</cac:CommodityClassification>
What the engine reports for the edited invoice
{
"element": "cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode",
"field": "cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode",
"fix_hint": "Add the required element at `/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode`: in a CVD invoice, an 'Item classification identifier' (BT-158) with scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3 (normalize-space comparison, per the official test).",
"location": "/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode",
"message": "An 'Item classification identifier' (BT-158) with the scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3; found ''.",
"rule": "BR-DE-CVD-04",
"severity": "fatal",
"terms": [
"BT-158"
],
"title": "In a CVD invoice, an 'Item classification identifier' (BT-158) with scheme identifier 'CVD' must contain one of the permitted vehicle categories M1, M2, M3, N1, N2, N3 (normalize-space comparison, per the official test)."
}
Rule ids the engine reports for 02.01a-cvd_INVOICE_ubl.xml untouched: BR-CL-13. After the edit, BR-DE-CVD-04 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/technical-cases/cvd/02.01a-cvd_INVOICE_ubl.xml from this repository, apply the one edit named above, and run einvoice validate 02.01a-cvd_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.