All rules · pint-om · error
IBR-091-OM
The amount due for payment must have no more than two decimal places.
Reviewed
Why this rule exists
Currency amounts settle to two decimals. A third decimal cannot be paid, and implies rounding has not been applied where it should have been.
Why it usually happens
- Serializing an unrounded computed value
- A percentage-based calculation producing three or more decimals
- Formatting an amount with a thousands separator, which fails as a decimal outright
How to fix it
Round monetary amounts to two decimals before serialization, and never apply display formatting to XML output.
<cbc:PayableAmount currencyID="AED">100.005</cbc:PayableAmount>
<cbc:PayableAmount currencyID="AED">100.01</cbc:PayableAmount>
The official rule
When Invoice transaction type (BTOM-001) is Profit margin invoice (00000000010000000000), Item classification identifier (IBT-158, listID='HS') MUST NOT start with '7101', '7102', '7103', '7104', '01' or '06'.
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
not($isProfitMargin) or (every $code in cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode[@listID='HS'] satisfies not( starts-with(normalize-space($code),'7101') or starts-with(normalize-space($code),'7102') or starts-with(normalize-space($code),'7103') or starts-with(normalize-space($code),'7104') or starts-with(normalize-space($code),'01') or starts-with(normalize-space($code),'06')))
Applied to nodes matching cac:InvoiceLine | cac:CreditNoteLine
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-om-1.0.1 | pint-om | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-om-1.0.0 | pint-om | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-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