At most one VAT amount in the invoice currency

Error PEPPOL-EN16931-R053 Peppol

No more than one tax total amount must be provided where currency id equals document currency code.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

More than one ram:TaxTotalAmount has a currencyID matching the document currency code. There may be at most one VAT amount in that currency in this location.

What the rule means

The VAT breakdown must not report the VAT amount in the invoice currency more than once in the summary.

Please include the VAT amount in the invoice currency only once

The invoice summary contains more than one VAT amount in the invoice currency. Adjust the information so that it appears there no more than once.

What to do
  1. Locate the ram:TaxTotalAmount elements in ram:SpecifiedTradeSettlementHeaderMonetarySummation.
  2. Count the elements whose currencyID matches the invoice currency and make sure there is no more than one.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:TaxTotalAmount currencyID="EUR">10.00</ram:TaxTotalAmount>
  <ram:TaxTotalAmount currencyID="EUR">5.00</ram:TaxTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:TaxTotalAmount currencyID="EUR">10.00</ram:TaxTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details

The test counts ram:TaxTotalAmount elements whose currencyID equals $documentCurrencyCode and requires the count to be no greater than one.

Where the rule applies

The rule applies to ram:TaxTotalAmount within ram:SpecifiedTradeSettlementHeaderMonetarySummation in ram:ApplicableHeaderTradeSettlement.

Context (rule/@context)
ram:ApplicableHeaderTradeSettlement
Test expression (assert/@test)
count(ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID = $documentCurrencyCode]) <=1