Allowed currency code for tax amounts

Error FX-SCH-A-000606 Factur-X

Value of '@currencyID' is not allowed.

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

The non-empty value of currencyID on this ram:TaxTotalAmount is not included in the applicable code list.

What the rule means

The currency code identifies the currency of the tax amount. A code that is not allowed prevents the currency of this amount from being identified according to the code list.

Please use an allowed currency code for this tax amount

The currency code on ram:TaxTotalAmount does not match an allowed entry in the code list. You can correct the value using the code list applicable to this rule.

What to do
  1. Find the ram:TaxTotalAmount whose currencyID matches ram:InvoiceCurrencyCode.
  2. Check the value of currencyID against the code list applicable to this rule.
  3. Generate the invoice again and validate it.
Technical details

The test permits an empty resolved code value; otherwise, the value of currencyID must occur in code list 31.

Where the rule applies

The rule applies to ram:TaxTotalAmount in the invoice header when its currencyID attribute matches ram:InvoiceCurrencyCode.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=../ ../ram:InvoiceCurrencyCode]
Test expression (assert/@test)
string-length($codeValue31)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=31]/enumeration[@value=$codeValue31]