All rules · en16931 · error

BR-CO-13

The total without tax must equal the sum of line net amounts, minus document-level allowances, plus document-level charges.

Reviewed

Why this rule exists

Document-level allowances and charges are the usual reason a total drifts from its lines. This rule is what catches a discount applied to the total but never declared.

Why it usually happens

How to fix it

Every adjustment between the line sum and the total must exist as an AllowanceCharge element.

The official rule

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).

Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.

Schematron test

((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 ))  or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount)))

Applied to nodes matching cac:LegalMonetaryTotal

Rule-pack versions

Rule-packLayerSeverityApplies to
pint-eu-1.1.1en16931errorbilling/creditnote, billing/invoice

Related rules

ibr-co-10 · ibr-co-15

Check your own invoice

Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.

Open the validator