All rules · en16931 · error

UBL-DT-01

Monetary amounts must be decimal numbers with at most two fraction digits.

Reviewed

Why this rule exists

Currency settles to two decimals. A third implies rounding was not applied where it should have been, and the amount cannot actually be paid.

Why it usually happens

How to fix it

Round to two decimals before serialization, and never apply display formatting to XML output.

Wrong
<cbc:PayableAmount currencyID="EUR">100.005</cbc:PayableAmount>
Right
<cbc:PayableAmount currencyID="EUR">100.01</cbc:PayableAmount>

The official rule

Amounts shall be decimal up to two fraction digits

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

Schematron test

string-length(substring-after(.,'.'))<=2

Applied to nodes matching //*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]

Rule-pack versions

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

Related rules

ibr-091 · BR-DEC-18

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
UBL-DT-01 — Monetary amounts must be decimal numbers with at most two f… · PINT Probe