Invalid currency code for the tax amount

Error FX-SCH-A-000525 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 value of the currencyID attribute is not included in the specified code list. An empty value does not trigger this error according to the test condition.

What the rule means

The currency code identifies the currency of the tax amount. A disallowed code can affect the unambiguous association of the amount with a currency.

Please use an allowed currency code for the tax amount

The currency code on ram:TaxTotalAmount is not included in the specified code list. You can correct the entry by using a value allowed in that list.

What to do
  1. Locate the tax amount whose currencyID matches the invoice currency ram:InvoiceCurrencyCode.
  2. Check currencyID and replace any disallowed value with one from the specified code list.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty currencyID value or a value from code list 23 of the Factur-X code database.

Where the rule applies

The rule applies to the currencyID attribute of ram:TaxTotalAmount when it matches the invoice currency ram:InvoiceCurrencyCode.

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