UBL-DT-01: Amounts shall be decimal up to two fraction digits
Peppol BIS Billing 3.0.20 · UBL
Original rule text
[UBL-DT-01]-Amounts shall be decimal up to two fraction digits
string-length(substring-after(.,'.'))<=2UBL-DT-01 is a fatal rule in the schema layer of Peppol BIS Billing 3.0.20 · UBL. An invoice that breaks it is rejected.
What this rule requires
The rule requires UBL elements whose names end with Amount (but not PriceAmount and not inside cac:Price/cac:AllowanceCharge) to have at most two digits after the decimal point. The test passes if there is no decimal point or if the part after the first . is at most 2 characters long. A document fails when such an amount value contains more than two fraction digits, for example 123.456.
How to fix
Change the offending amount element to a value with at most two decimal places, e.g. round 123.456 to 123.45 or 123.46 depending on your rounding policy. If the value is generated by a system, configure it to round amounts to two decimals before writing UBL.
Guidance on this rule. The original text above is authoritative.
Where to go next
No published Peppol BIS Billing UBL release comparison lists a change to UBL-DT-01.
Validate an invoice against these rules · All release changes