All rules · pint-base · error
ibr-co-15
The total with tax must equal the total without tax plus the total VAT amount.
Reviewed
Why this rule exists
This is the arithmetic every downstream system re-checks. If the three totals do not reconcile, nobody — the buyer, the ASP, or the tax authority — can tell which of them is the real number.
Why it usually happens
- Rounding the tax total independently of the per-category amounts it aggregates
- Adding a document-level charge to the tax-inclusive total but not to the exclusive one
- Floating-point arithmetic producing a fraction of a fils that survives into serialization
How to fix it
Compute the inclusive total as exclusive + tax using a decimal type, and serialize that result rather than a separately-derived figure.
<cbc:TaxExclusiveAmount currencyID="AED">1000.00</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="AED">1051.00</cbc:TaxInclusiveAmount> <!-- with TaxAmount 50.00, this is off by 1.00 -->
<cbc:TaxExclusiveAmount currencyID="AED">1000.00</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="AED">1050.00</cbc:TaxInclusiveAmount>
The official rule
Invoice total amount with Tax (ibt-112) = Invoice total amount without Tax (ibt-109) + Invoice total Tax amount (ibt-110).
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
cac:TaxTotal/cbc:TaxIncludedIndicator = true() or ((cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + cac:TaxTotal[1]/xs:decimal(cbc:TaxAmount[@currencyID=/*/cbc:DocumentCurrencyCode])) * 10 * 10) div 100))
Applied to nodes matching /ubl:Invoice | /cn:CreditNote
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-om-1.0.1 | pint-base | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-ae-2026.5 | pint-base | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-eu-1.1.1 | pint-base | error | billing/creditnote, billing/invoice |
| pint-ae-2026.3 | pint-base | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-om-1.0.0 | pint-base | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
Related rules
ibr-co-13 · ibr-co-16 · aligned-ibrp-s-08
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