Element variant 'ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]' may occur at maximum 1 times.
ram:TaxTotalAmount occurs more than once in an invoice line’s summation with a currencyID matching the invoice currency.
The tax total in the invoice currency may be stated only once in an invoice line’s summation. Multiple occurrences would state this amount more than once.
The tax total in the invoice currency appears more than once in an invoice line’s summation. This variant may occur there no more than once.
- Check the
ram:TaxTotalAmountelements in the invoice line’s summation. - Make sure no more than one element uses the
currencyIDfromram:InvoiceCurrencyCode. - Generate the invoice again and validate it.
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:TaxTotalAmount currencyID="EUR">19.00</ram:TaxTotalAmount> <ram:TaxTotalAmount currencyID="EUR">20.00</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:TaxTotalAmount currencyID="EUR">19.00</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation>
Technical details
The XPath counts only ram:TaxTotalAmount elements whose currencyID matches the value of ram:InvoiceCurrencyCode in the header; the test passes with at most one match.
The rule applies to ram:TaxTotalAmount in an invoice line’s monetary summation. It checks the variant whose currencyID matches ram:InvoiceCurrencyCode.
rule/@context)assert/@test)