BR-KSA-80: Prepaid amount must equal prepayment taxable plus tax amounts
cac:LegalMonetaryTotal/cbc:PrepaidAmount (BT-113) must equal, to two decimals, the sum of all line-level cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount (KSA-31) plus cbc:TaxAmount (KSA-32). The executed check also warns when such line-level subtotals exist while PrepaidAmount is 0 or absent, and when PrepaidAmount is non-zero, both sums are positive and any line cac:DocumentReference/cbc:DocumentTypeCode is not 386.
How to fix it
Set cbc:PrepaidAmount to the total of the prepayment lines' TaxableAmount plus TaxAmount (e.g. 1000 + 150 gives <cbc:PrepaidAmount currencyID="SAR">1150.00</cbc:PrepaidAmount>), use DocumentTypeCode 386 in those lines, and include line-level cac:TaxSubtotal only when there is a prepayment.
ZATCA's official text
[BR-KSA-80] - The Pre-Paid amount (BT-113) must be equal to the sum total of the Prepayment VAT category Taxable Amount (KSA-31) and the Prepayment VAT Category Tax Amount (KSA-32).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
(($prepaid-amount = 0 or not($prepaid-amount-exists)) and (($taxable-amount-exists) or ($tax-amount-exists))) or (($prepaid-amount != 0 ) and ($taxable-amount-sum > 0) and ($tax-amount-sum > 0) and $any-document-type-code-not-386 ) or (format-number($prepaid-amount, '#.00') != format-number($total-tax-amount, '#.00'))
Related rules
- BR-CO-16 · Amount due = total with VAT - prepaid amount + rounding amount
- BR-KSA-73 · Prepaid amount (BT-113) requires full prepayment reference on lines
- BR-KSA-75 · Prepayment lines need taxable amount, tax amount, category and rate
- BR-KSA-79 · Line VAT breakdown: tax amount = taxable amount x rate / 100
- BR-KSA-DEC-06 · Prepayment taxable and tax amounts may have at most two decimals
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