BR-KSA-EN16931-08: Exactly one TaxTotal with tax subtotals per invoice

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

Warning: accepted with a warningAll invoicesFields: BG-22

Counts the document-level cac:TaxTotal elements that contain at least one cac:TaxSubtotal (the VAT breakdown). There must be exactly one such cac:TaxTotal.

How to fix it

Put all cac:TaxSubtotal elements inside a single cac:TaxTotal. Any other document-level cac:TaxTotal must contain only cbc:TaxAmount and no cac:TaxSubtotal.

ZATCA's official text

[BR-KSA-EN16931-08]-Only one tax total (BG-22) with tax subtotals must be provided.Refer to Calculation of VAT.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

not(count(./cac:TaxTotal[cac:TaxSubtotal]) = 1)

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