BR-KSA-79: Line VAT breakdown: tax amount = taxable amount x rate / 100
For every line-level cac:TaxTotal/cac:TaxSubtotal (the prepayment breakdown), cbc:TaxAmount (KSA-32) must equal cbc:TaxableAmount (KSA-31) x cac:TaxCategory/cbc:Percent (KSA-34) / 100 rounded to two decimals, within 0.01; a missing or empty cbc:Percent fails. For categories Z and E (and O without a rate) the tax amount must be 0.00, and the check runs on such lines whether or not cbc:PrepaidAmount is present.
How to fix it
Compute the line TaxSubtotal's cbc:TaxAmount as cbc:TaxableAmount x cbc:Percent / 100 rounded to 2 decimals (e.g. 1000 at 15.00 gives 150.00), and use 0.00 with a 0 rate for Z or E.
ZATCA's official text
[BR-KSA-79]-The Prepayment VAT Category Tax Amount (KSA-32) must be Prepayment VAT category Taxable Amount( (KSA-31) x Prepayment VAT rate (KSA-34) /100).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
(not(format-number(./cbc:TaxAmount,'#.00') = format-number(( round((((xs:decimal(./cbc:TaxableAmount) * (0)) div 100) * 100 + 0.01)) div 100), '#.00') )) or (not(format-number(./cbc:TaxAmount, '#.00') = format-number(round(xs:decimal(./cbc:TaxableAmount) * xs:decimal(./cac:TaxCategory/cbc:Percent) div 100, 2), '#.00')))
Related rules
- BR-KSA-75 · Prepayment lines need taxable amount, tax amount, category and rate
- BR-KSA-76 · Zero-rated (Z) prepayment line VAT rate must be 0
- BR-KSA-77 · Exempt (E) prepayment line VAT rate must be 0
- BR-KSA-78 · Not-subject (O) prepayment line VAT rate must be 0
- BR-KSA-80 · Prepaid amount must equal prepayment taxable plus tax amounts
- BR-KSA-84 · Standard-rated (S) VAT rate must be 15 or 5
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