# PEPPOL-EN16931-R005

Source: https://xmlvalid.com/rules/PEPPOL-EN16931-R005

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

- Level: error
- Rule sets: Peppol BIS Billing 3.0 rules 3.0.21, XRechnung 3.0 rules (UBL) 2.6.0
- Context: `cbc:TaxCurrencyCode`
- Test: `not(normalize-space(text()) = normalize-space(../cbc:DocumentCurrencyCode/text()))`

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

- Level: error
- Rule sets: XRechnung 3.0 rules (CII) 2.6.0
- Context: `ram:ApplicableHeaderTradeSettlement`
- Test: `not(ram:TaxCurrencyCode) or normalize-space(ram:TaxCurrencyCode/text()) != normalize-space(ram:InvoiceCurrencyCode/text())`

## Why it fails

- The VAT accounting currency (`cbc:TaxCurrencyCode`, BT-6) is the same as the invoice currency.

## How to fix it

- Leave `cbc:TaxCurrencyCode` out when VAT is accounted in the invoice currency. It is only for invoices in one currency whose VAT is reported in another, such as an invoice in USD from a seller who accounts VAT in EUR.

Validate a document against these rules: https://xmlvalid.com/validate
