fatalEN 16931EN 16931 business ruleCIIUBLBG-3BT-25
Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).
A preceding invoice reference group (BG-3) has no reference (BT-25).
Add BT-25 - the number of the invoice being corrected or credited (UBL cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID). Credit notes and corrective invoices need it.
CII — context $Preceding_Invoice
normalize-space(ram:IssuerAssignedID) != ''
UBL — context cac:BillingReference
exists(cac:InvoiceDocumentReference/cbc:ID)