All rules · en16931 · error
BR-CO-16
The amount due for payment must equal the total with tax, minus any amount already paid, plus any rounding amount.
Reviewed
Why this rule exists
This is the number the buyer actually pays. If it does not follow from the totals above it, the invoice is internally inconsistent and the payment will not match.
Why it usually happens
- Prepayments recorded internally but never emitted as PrepaidAmount
- Applying a rounding adjustment to the payable amount without declaring PayableRoundingAmount
How to fix it
If you deduct anything from the payable amount, emit the element that declares the deduction.
<cbc:TaxInclusiveAmount currencyID="AED">1050.00</cbc:TaxInclusiveAmount> <cbc:PrepaidAmount currencyID="AED">50.00</cbc:PrepaidAmount> <cbc:PayableAmount currencyID="AED">1000.00</cbc:PayableAmount>
The official rule
Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
(exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount)))
Applied to nodes matching cac:LegalMonetaryTotal
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-eu-1.1.1 | en16931 | error | billing/creditnote, billing/invoice |
Related rules
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