All rules · pint-ae · error
ibr-147-ae
The invoice line net amount must equal quantity x item net price, after any line-level allowances and charges, rounded to two decimals.
Reviewed
Why this rule exists
Line arithmetic is the foundation the document totals are checked against. If a line does not reconcile, every total above it is unverifiable, so this is caught at the line rather than at the bottom of the document.
Why it usually happens
- Rounding the unit price for display and then multiplying the rounded value
- Applying a line discount to the amount but not reflecting it in the allowance element
- Floating-point accumulation — 0.1 + 0.2 arithmetic reaching the serializer without a decimal type
- Price base quantity ignored: a price quoted per 100 units multiplied as if it were per unit
How to fix it
Compute line amounts with a fixed-point decimal type, round once at the end, and let the rounded value be the one you serialize.
<cbc:InvoicedQuantity unitCode="EA">3</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="AED">100.00</cbc:LineExtensionAmount> <cac:Price><cbc:PriceAmount currencyID="AED">33.33</cbc:PriceAmount></cac:Price>
<cbc:InvoicedQuantity unitCode="EA">3</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="AED">99.99</cbc:LineExtensionAmount> <cac:Price><cbc:PriceAmount currencyID="AED">33.33</cbc:PriceAmount></cac:Price>
The official rule
Invoice line net amount (IBT-131) MUST equal (Invoiced quantity (IBT-129) * (Item net price (IBT-146)/item price base quantity (IBT-149)) + Sum of invoice line charge amount (IBT-141) - sum of invoice line allowance amount (IBT-136).
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
round(cbc:LineExtensionAmount * 100) div 100 = round((((cbc:InvoicedQuantity | cbc:CreditedQuantity) * (cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity)) + sum(cac:AllowanceCharge[cbc:ChargeIndicator="true"]/cbc:Amount) - sum(cac:AllowanceCharge[cbc:ChargeIndicator="false"]/cbc:Amount)) * 100) div 100
Applied to nodes matching cac:InvoiceLine | cac:CreditNoteLine
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-ae-2026.5 | pint-ae | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-ae-2026.3 | pint-ae | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
Related rules
ibr-co-10 · ibr-co-13 · aligned-ibrp-004
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