BR-CO-15: Total with VAT must equal total without VAT plus total VAT

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

Error: the invoice is rejectedAll invoicesFields: BT-112, BT-109, BT-110

The document must have at least one cac:TaxTotal/cbc:TaxAmount whose @currencyID equals cbc:DocumentCurrencyCode, and cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount (BT-112) must equal cbc:TaxExclusiveAmount (BT-109) plus the sum of all cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount values, rounded to two decimals.

How to fix it

Set cbc:TaxInclusiveAmount = cbc:TaxExclusiveAmount + Σ cac:TaxSubtotal/cbc:TaxAmount (rounded to 2 decimals), and give at least one cac:TaxTotal/cbc:TaxAmount the document currency, e.g. <cbc:TaxAmount currencyID="SAR">.

ZATCA's official text

[BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not(every $Currency in cbc:DocumentCurrencyCode satisfies (count(cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) >= 1) and (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + sum(cac:TaxTotal/cac:TaxSubtotal/xs:decimal(cbc:TaxAmount))) * 10 * 10) div 100))

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