BR-CO-17: VAT amount per category must equal taxable amount x rate

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

Warning: accepted with a warningAll invoicesFields: BT-117, BT-116, BT-119

For each /ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal, cbc:TaxAmount (BT-117) must equal cbc:TaxableAmount (BT-116) × cac:TaxCategory/cbc:Percent (BT-119) / 100, rounded to two decimals. The executed check allows a tolerance of 0.01 per invoice line (number of lines × 0.01); the listed test text describes a ±1 tolerance instead.

How to fix it

Compute each subtotal's cbc:TaxAmount as round(cbc:TaxableAmount × cbc:Percent / 100, 2), using the same cbc:Percent that appears in that subtotal's cac:TaxCategory.

ZATCA's official text

[BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not(($taxAmount >= $upperLimit and $taxAmount <= $lowerLimit) or ($taxAmount = $shouldBe))

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