BR-CO-14: Total VAT must equal the sum of the VAT breakdown amounts

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

Error: the invoice is rejectedAll invoicesFields: BT-110, BT-117

For each cac:TaxTotal, cbc:TaxAmount (BT-110) must equal the sum of cbc:TaxAmount (BT-117) of its cac:TaxSubtotal children, rounded to two decimals. A cac:TaxTotal with no cac:TaxSubtotal is not checked.

How to fix it

In the cac:TaxTotal that carries the breakdown, set cbc:TaxAmount to the sum of its cac:TaxSubtotal/cbc:TaxAmount values, rounded to 2 decimals.

ZATCA's official text

[BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not((xs:decimal(child::cbc:TaxAmount)= round((sum(cac:TaxSubtotal/xs:decimal(cbc:TaxAmount)) * 10 * 10)) div 100) or not(cac:TaxSubtotal))

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