Allowance/charge percentage MUST be provided when allowance/charge base amount is provided.
An allowance or charge contains ram:BasisAmount but no ram:CalculationPercent. The rule requires the percentage for this combination.
The percentage indicates how the base amount is used to calculate the allowance or charge.
A base amount is provided for an allowance or charge, but its percentage is missing. You can correct the invoice by adding the percentage.
- Find the affected
ram:SpecifiedTradeAllowanceCharge. - Add
ram:CalculationPercentthere to accompanyram:BasisAmount. - Generate the invoice again and validate it.
<ram:SpecifiedTradeAllowanceCharge> <ram:BasisAmount>100</ram:BasisAmount> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:BasisAmount>100</ram:BasisAmount> <ram:CalculationPercent>10</ram:CalculationPercent> </ram:SpecifiedTradeAllowanceCharge>
Technical details
The rule context selects allowances or charges with ram:BasisAmount and without ram:CalculationPercent; the false() test fails for every entry selected this way.
The rule applies to a ram:SpecifiedTradeAllowanceCharge where ram:BasisAmount is present and ram:CalculationPercent is absent.
rule/@context)assert/@test)