BR-CO-10: Total line amount must equal the sum of all line net amounts
cac:LegalMonetaryTotal/cbc:LineExtensionAmount (BT-106) must equal the sum of cbc:LineExtensionAmount (BT-131) across all cac:InvoiceLine / cac:CreditNoteLine elements, rounded to two decimals.
How to fix it
Set cac:LegalMonetaryTotal/cbc:LineExtensionAmount to the sum of every line's cbc:LineExtensionAmount, rounded to 2 decimals.
ZATCA's official text
[BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
not((xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100)))
Related rules
- BR-24 · Each invoice line needs a line net amount (BT-131)
- BR-CO-13 · Total without VAT = line amounts - allowances + charges
- BR-E-08 · Exempt (E) taxable amount must match the exempt lines and adjustments
- BR-KSA-51 · Line amount with VAT (KSA-12) = line net amount + line VAT
- BR-KSA-82 · Prepayment lines must carry zero line amounts
- BR-KSA-EN16931-11 · Line net amount = quantity × net price ± line charges/allowances
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