IBR-033-OM

[IBR-033-OM] - Allowance amount (IBT-092, IBT-136) must equal base amount (IBT-093, IBT-137) * percentage (IBT-094, IBT-138) /100 if base amount and percentage exists.

About

ID
IBR-033-OM
Flag
fatal
Context
ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = 'false'] | cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = 'false']
Test
not(cbc:BaseAmount and cbc:MultiplierFactorNumeric) or ( cbc:Amount castable as xs:decimal and cbc:BaseAmount castable as xs:decimal and cbc:MultiplierFactorNumeric castable as xs:decimal and u:slack( xs:decimal(cbc:Amount), xs:decimal( round( ( xs:decimal(cbc:BaseAmount) * xs:decimal(cbc:MultiplierFactorNumeric) div 100 ) * 100 ) div 100 ), 0.02 ) )