BR-KSA-79: Line VAT breakdown: tax amount = taxable amount x rate / 100

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

Warning: accepted with a warningConditional, see belowFields: KSA-32, KSA-31, KSA-34

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

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