- ActualAmount should exist maximum once
ram:ActualAmount occurs more than once inside ram:SpecifiedTradeAllowanceCharge. This element may appear at most once in the entry.
ram:ActualAmount contains the actual amount of the allowance or charge. Repeating it makes the amount for that entry ambiguous.
An entry in ram:SpecifiedTradeAllowanceCharge contains ram:ActualAmount more than once. You can resolve this by having the element appear only once.
- Find the affected
ram:SpecifiedTradeAllowanceChargeentry. - Check how many times
ram:ActualAmountoccurs in it. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeAllowanceCharge> <ram:ActualAmount>10.00</ram:ActualAmount> <ram:ActualAmount>5.00</ram:ActualAmount> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ActualAmount>10.00</ram:ActualAmount> </ram:SpecifiedTradeAllowanceCharge>
Technical details
The XPath test counts direct ram:ActualAmount child elements of ram:SpecifiedTradeAllowanceCharge and permits no more than one.
The rule applies to each ram:SpecifiedTradeAllowanceCharge entry at document level.
rule/@context)assert/@test)