Element 'ram:ChargeTotalAmount' may occur at maximum 1 times.
ram:ChargeTotalAmount occurs more than once in ram:SpecifiedTradeSettlementHeaderMonetarySummation. The element may occur there at most once.
ram:ChargeTotalAmount contains the total of charges at document level. Limiting it to at most one element prevents the total from being stated multiple times.
The charge total has been entered more than once in the settlement totals. Remove the additional occurrences of ram:ChargeTotalAmount.
- Find
ram:SpecifiedTradeSettlementHeaderMonetarySummation. - Check its
ram:ChargeTotalAmountelements and remove all but at most one. - Generate the invoice again and validate it again.
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:ChargeTotalAmount>10.00</ram:ChargeTotalAmount> <ram:ChargeTotalAmount>5.00</ram:ChargeTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:ChargeTotalAmount>10.00</ram:ChargeTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details
The rule counts the direct ram:ChargeTotalAmount child elements of ram:SpecifiedTradeSettlementHeaderMonetarySummation and permits a count of 0 or 1.
The rule applies to the monetary totals of the settlement at document level in ram:SpecifiedTradeSettlementHeaderMonetarySummation.
rule/@context)assert/@test)