InvoiceValidator.eu

BR-DEC-27

fatalEN 16931EN 16931 business ruleCIIUBLBT-141

The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2.

Why it fails

Invoice line charge amount (BT-141) is written with more than 2 decimal places.

How to fix it

Round BT-141 to 2 decimals before serialising it. This is a formatting rule, not an arithmetic one - the value itself is usually right, the XML just carries extra digits from a float. Format the amount as a fixed-point decimal string.

What the validator checks

CII — context $Invoice_line_charges

string-length(substring-after(../ram:ActualAmount[1],'.'))<=2

UBL — context $Invoice_line_charges

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

Related rules

Part of BR-DEC — Decimal places.

Check your own invoice against BR-DEC-27

…or paste the XML instead

Nothing is stored, and the whole invoice is checked, not just this rule. A PDF only works if it is Factur-X / ZUGFeRD — a PDF with the invoice XML inside it.