# UBL-CR-646

Source: https://xmlvalid.com/rules/UBL-CR-646

> A UBL invoice should not include the InvoiceLine SubInvoiceLine

- Level: warning
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), EXTENDED-CTC-FR rules (UBL) 1.4.0.04, Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `not((cac:InvoiceLine|cac:CreditNoteLine)/cac: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`.

Validate a document against these rules: https://xmlvalid.com/validate
