Validation rules
UBL-CR-646 — UBL rule
An invoice line contains cac:SubInvoiceLine. XRechnung prohibits sub-invoice lines — the KoSIT validator raises this from a warning to an error, so the document is rejected.
- Rule
UBL-CR-646— official EN 16931 / XRechnung rule- Severity
- error
- Detected by
- tier 3 — KoSIT validator (authoritative)
- Reachability
- Only reachable when validating your own XML — normbill-generated documents cannot trigger it
Error via the KoSIT configuration's customLevel (CEN ships it as a warning). normbill lines are always flat, so generated XML never contains SubInvoiceLine.
How to fix it
Flatten the hierarchy: model every sub-line as its own top-level cac:InvoiceLine.
UBL-CR-646 auf Deutsch — was bedeutet der Fehler?
Der KoSIT-Validator lehnt die Rechnung ab, weil eine Rechnungsposition cac:SubInvoiceLine enthält. Die XRechnung verbietet Unterpositionen — die Validator-Konfiguration stuft diese Regel von einer Warnung zu einem Fehler hoch.
So beheben Sie den Fehler
Lösen Sie die Hierarchie auf: Modellieren Sie jede Unterposition als eigene cac:InvoiceLine auf oberster Ebene.
Related rules
UBL-CR-561— An invoice line contains cac:TaxTotal. In EN 16931 VAT is broken down at document level only (BG-23) — lines…UBL-CR-006— cbc:IssueTime is present. The EN 16931 core model works with dates only (BT-2) — a time of day is not part…UBL-CR-002— cbc:UBLVersionID is present with a value other than 2.1. EN 16931 invoices are UBL 2.1 — omit the element or…UBL-CR-001— The document contains ext:UBLExtensions. Extensions are valid UBL but not part of the EN 16931 core model —…
Official sources
- XRechnung specification (KoSIT / xeinkauf.de)
- KoSIT validator on GitHub and the XRechnung validator configuration
Every 422 from the API lists the rule id, the path in your request JSON, a plain-language message and a suggested fix — see the docs overview for the report format.
Or try it live: drop any XRechnung XML on the free validator — same KoSIT-backed report, no account.