BR-CO-13: Total without VAT = line amounts - allowances + charges

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

Warning: accepted with a warningAll invoicesFields: BT-109, BT-131, BT-107, BT-108

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

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