Use a different VAT accounting currency from the invoice currency

Error PEPPOL-EN16931-R005 Peppol

VAT accounting currency code MUST be different from invoice currency code when provided.

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

When ram:TaxCurrencyCode is provided, its normalized text value matches that of ram:InvoiceCurrencyCode. In this case, the VAT accounting currency must not be the same as the invoice currency.

What the rule means

The VAT accounting currency is a separate currency designation and, when provided, must differ from the invoice currency.

Please use a VAT accounting currency different from the invoice currency

The VAT accounting currency provided matches the invoice currency. If you provide a VAT accounting currency, it must differ from the invoice currency.

What to do
  1. Locate ram:TaxCurrencyCode and ram:InvoiceCurrencyCode in ram:ApplicableHeaderTradeSettlement.
  2. Compare the two currency values and make sure they differ.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeSettlement>
  <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
  <ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
</ram:ApplicableHeaderTradeSettlement>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
  <ram:TaxCurrencyCode>USD</ram:TaxCurrencyCode>
</ram:ApplicableHeaderTradeSettlement>
Technical details

The test passes if ram:TaxCurrencyCode is absent or its normalized text value differs from that of ram:InvoiceCurrencyCode.

Where the rule applies

The rule applies to ram:TaxCurrencyCode and ram:InvoiceCurrencyCode in ram:ApplicableHeaderTradeSettlement.

Context (rule/@context)
ram:ApplicableHeaderTradeSettlement
Test expression (assert/@test)
not(ram:TaxCurrencyCode) or normalize-space(ram:TaxCurrencyCode/text()) != normalize-space(ram:InvoiceCurrencyCode/ text())