Invoice currency code is not allowed

Error FX-SCH-A-000861 Factur-X

Value of 'ram:InvoiceCurrencyCode' 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 ram:InvoiceCurrencyCode is not empty and does not match an entry in the associated code list.

What the rule means

The currency code identifies the currency in which the invoice is issued. Under this rule, a value absent from the list is not recognized as an allowed invoice currency code.

Please use an allowed currency code for the invoice

The entry in ram:InvoiceCurrencyCode is not included in the allowed code list. Using an allowed value makes it possible to validate the invoice again.

What to do
  1. Locate ram:InvoiceCurrencyCode in the settlement.
  2. Check its value against the allowed code list.
  3. Generate the invoice again and validate it again.
Technical details

The test accepts an empty value or a value included in the code list identified by 42.

Where the rule applies

The rule applies to ram:InvoiceCurrencyCode in the settlement at document level.

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