Allowance/charge amount must equal base amount * percentage/100 if base amount and percentage exists
When both ram:BasisAmount and ram:CalculationPercent are present, ram:ActualAmount does not match the base amount multiplied by the percentage and divided by 100 within the permitted tolerance. If ram:ActualAmount is absent, the comparison uses 0.
The amount of a percentage-based allowance or charge must be arithmetically consistent with its base amount and percentage.
The amount of an allowance or charge does not match the calculation based on its base amount and percentage. You can correct the invoice by aligning the related values.
- Find the affected
ram:SpecifiedTradeAllowanceCharge. - Compare
ram:ActualAmountwithram:BasisAmountmultiplied byram:CalculationPercentand divided by 100. - Generate the invoice again and validate it.
<ram:SpecifiedTradeAllowanceCharge> <ram:ActualAmount>11</ram:ActualAmount> <ram:BasisAmount>100</ram:BasisAmount> <ram:CalculationPercent>10</ram:CalculationPercent> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ActualAmount>10</ram:ActualAmount> <ram:BasisAmount>100</ram:BasisAmount> <ram:CalculationPercent>10</ram:CalculationPercent> </ram:SpecifiedTradeAllowanceCharge>
Technical details
If ram:BasisAmount and ram:CalculationPercent are not both present, the test passes. Otherwise, u:slack compares ram:ActualAmount (or 0 if absent) with ram:BasisAmount × ram:CalculationPercent ÷ 100, allowing for $slackValue.
The rule applies to each ram:SpecifiedTradeAllowanceCharge.
rule/@context)assert/@test)