fatalEN 16931EN 16931 business ruleCIIUBLBT-131
The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.
Invoice line net amount (BT-131) is written with more than 2 decimal places.
Round BT-131 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.
CII — context $Invoice_Line
string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2
UBL — context $Invoice_Line
string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2