DT-CIUS-PT-169
The BT-141 must equal the multiplication between the Invoice line charge base amount (BT-142) and the Invoice line charge percentage (BT-143), with an acceptance range of 1.00 € (it does not mean that this tolerance is accepted by the customer).
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = 'true'] | cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = 'true']
(not(exists(xs:decimal(cbc:MultiplierFactorNumeric))) and not(exists(xs:decimal(cbc:BaseAmount)))) or (((xs:decimal(cbc:BaseAmount) * (xs:decimal(cbc:MultiplierFactorNumeric) div 100) * 10 * 10) div 100) <= (xs:decimal(cbc:Amount) + 1.00) and ((xs:decimal(cbc:BaseAmount) * (xs:decimal(cbc:MultiplierFactorNumeric) div 100) * 10 * 10) div 100) >= (xs:decimal(cbc:Amount) - 1.00))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)