BR-55: A billing reference must give the preceding invoice number (BT-25)

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedConditional, see belowFields: BG-3, BT-25

Applies only when cac:BillingReference is present; each must contain cac:InvoiceDocumentReference/cbc:ID with a non-empty value.

How to fix it

Inside each billing reference put the referenced invoice number: <cac:BillingReference><cac:InvoiceDocumentReference><cbc:ID>INV-0001</cbc:ID></cac:InvoiceDocumentReference></cac:BillingReference>.

ZATCA's official text

[BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not(exists(cac:InvoiceDocumentReference/cbc:ID) and (cac:InvoiceDocumentReference/cbc:ID) !='')

Related rules

Validate your invoice against ZATCA's rules

Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.

Validate an invoice or try Matheel