fatalEN 16931syntax binding ruleUBL
Amounts shall be decimal up to two fraction digits
An amount has more than two decimal places.
Round every amount to 2 decimals and serialise it as a fixed-point string. Floating-point formatting is the usual culprit: 12.340000000000001 fails this.
UBL — context //*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]
string-length(substring-after(.,'.'))<=2