UBL-CR-646
A UBL invoice should not include the InvoiceLine SubInvoiceLine
Why it fails
- An invoice line has sub-lines (
cac:SubInvoiceLine), which EN 16931 does not know; they are dropped when the invoice is processed. - An XRechnung Extension invoice uses sub-lines but declares the standard XRechnung identifier, so the rules of the core profile apply.
How to fix it
Turn sub-lines into lines of their own, or describe them in the line note (BT-127). For German public buyers that accept it, the XRechnung Extension allows sub-lines: declare urn:cen.eu:en16931:2017#conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
/ubl:Invoice | /cn:CreditNote
not((cac:InvoiceLine|cac:CreditNoteLine)/cac:SubInvoiceLine)
Checked with EN 16931 Invoice (UBL), EN 16931 Credit Note (UBL), Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)