Element 'ram:TotalPrepaidAmount' may occur at maximum 1 times.
ram:TotalPrepaidAmount occurs more than once in ram:SpecifiedTradeSettlementHeaderMonetarySummation. The element may occur there at most once.
ram:TotalPrepaidAmount contains the total amount prepaid at document level. Limiting it to at most one element prevents this amount from being stated multiple times.
The total prepaid amount has been entered more than once in the settlement totals. Remove the additional occurrences of ram:TotalPrepaidAmount.
- Find
ram:SpecifiedTradeSettlementHeaderMonetarySummation. - Check its
ram:TotalPrepaidAmountelements and remove all but at most one. - Generate the invoice again and validate it again.
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TotalPrepaidAmount>10.00</ram:TotalPrepaidAmount> <ram:TotalPrepaidAmount>5.00</ram:TotalPrepaidAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TotalPrepaidAmount>10.00</ram:TotalPrepaidAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details
The rule counts the direct ram:TotalPrepaidAmount 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)