BR-S-08: Standard-rated (S) taxable amount must match its lines
For each cac:TaxSubtotal with VAT category 'S' (Standard rated), cbc:TaxableAmount must equal the sum of cbc:LineExtensionAmount of lines with category S, plus document-level charges, minus document-level allowances with category S. The executed check also warns if no line or document-level allowance/charge uses category S. The executed check compares the sum of the cbc:TaxableAmount of all S breakdowns (not each one separately) with that total; the published test compares the single breakdown and passes whenever S lines or allowances/charges exist.
How to fix it
Set the S breakdown's cbc:TaxableAmount to Σ line net amounts (S) + Σ document charges (S) − Σ document allowances (S), and remove the S breakdown if no line or allowance/charge uses category S.
ZATCA's official text
[BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Standard rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Standard Rate".
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and not(exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']) or exists(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'S']])) or not( sum((../../cac:TaxSubtotal[cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:TaxableAmount)))=(sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:LineExtensionAmount) ) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S']/xs:decimal(cbc:Amount)) ))
Related rules
- BR-24 · Each invoice line needs a line net amount (BT-131)
- BR-31 · Each document-level allowance needs an amount (BT-92)
- BR-32 · Each document-level allowance needs a VAT category code (BT-95)
- BR-36 · Each document-level charge needs an amount (BT-99)
- BR-37 · Each document-level charge needs a VAT category code (BT-102)
- BR-45 · Each VAT breakdown needs a taxable amount (BT-116)
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