BR-CO-13: Total without VAT = line amounts - allowances + charges
cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount (BT-109) must equal the sum of the lines' cbc:LineExtensionAmount, plus cbc:ChargeTotalAmount, minus cbc:AllowanceTotalAmount (each only if present), rounded to two decimals. The executed check sums the line amounts directly (the listed test text uses the BT-106 total instead) and also warns if ChargeTotalAmount is present but empty.
How to fix it
Compute cbc:TaxExclusiveAmount as Σ line cbc:LineExtensionAmount − cbc:AllowanceTotalAmount + cbc:ChargeTotalAmount, rounded to 2 decimals.
ZATCA's official text
[BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
not(xs:decimal(cbc:ChargeTotalAmount) = ( round ( sum(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]/xs:decimal(cbc:Amount)) * 10 * 10)div 100 ) or ( not(cbc:ChargeTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=true()])))
Related rules
- BR-13 · The invoice total without VAT (BT-109) must be present
- BR-24 · Each invoice line needs a line net amount (BT-131)
- BR-CO-10 · Total line amount must equal the sum of all line net amounts
- BR-CO-11 · Allowance total must equal the sum of document-level allowances
- BR-CO-12 · Charge total must equal the sum of document-level charges
- BR-CO-15 · Total with VAT must equal total without VAT plus total VAT
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