Message

Elements of data type amount cannot have more than 2 decimals (I.e. all amounts except unit price amounts)

Context
cbc:Amount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:PriceAmount | cbc:BaseAmount | cac:LegalMonetaryTotal/cbc:*
Test
ancestor::node()/local-name() = 'Price' or string-length(substring-after(., '.')) <= 2