BR-CO-04: Every invoice line needs a VAT category code

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

Error: the invoice is rejectedAll invoicesFields: BG-25, BT-151

Each cac:InvoiceLine (or cac:CreditNoteLine) must contain cac:Item/cac:ClassifiedTaxCategory with cac:TaxScheme/cbc:ID = 'VAT' and a cbc:ID holding the item's VAT category code (BT-151).

How to fix it

Inside each line's cac:Item add <cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>15.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory>, using the category code and rate that apply to the item.

ZATCA's official text

[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not((cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/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