BR-CO-17: VAT amount per category must equal taxable amount x rate
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
- BR-45 · Each VAT breakdown needs a taxable amount (BT-116)
- BR-46 · Each VAT breakdown needs a VAT amount (BT-117)
- BR-48 · Each VAT breakdown needs a VAT rate (BT-119) unless category is O
- BR-CO-14 · Total VAT must equal the sum of the VAT breakdown amounts
- BR-E-08 · Exempt (E) taxable amount must match the exempt lines and adjustments
- BR-E-09 · VAT amount in an exempt (E) breakdown must be 0
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