fatalEN 16931EN 16931 business ruleCIIUBLBG-25BT-126
Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126).
An invoice line has no line identifier (BT-126).
Give every line a BT-126 (UBL InvoiceLine/cbc:ID, CII AssociatedDocumentLineDocument/ram:LineID). Any unique string works - '1', '2', '3' is fine - but it must be present on EVERY line and unique within the invoice.
CII — context $Invoice_Line
normalize-space(ram:AssociatedDocumentLineDocument/ram:LineID) != ''
UBL — context $Invoice_Line
normalize-space(cbc:ID) != ''
Nothing is stored, and the whole invoice is checked, not just this rule. A PDF only works if it is Factur-X / ZUGFeRD — a PDF with the invoice XML inside it.