Use an allowed currency code for the invoice

Error FX-SCH-A-000595 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 included in the code list assigned to this element. This test also accepts an empty value.

What the rule means

ram:InvoiceCurrencyCode specifies the currency of the invoice. A value that is not listed is not a currency code intended for this field.

Please use a valid currency code for the invoice

The value in ram:InvoiceCurrencyCode is not recognized as an allowed currency code. You can correct it using the code list that applies to this field.

What to do
  1. Find ram:InvoiceCurrencyCode in the settlement details.
  2. Compare its value with the code list that applies to this field.
  3. Replace any unlisted value with an allowed currency code.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value listed in code list 24; a non-empty value that is not listed fails.

Where the rule applies

This rule applies to ram:InvoiceCurrencyCode within the document-level settlement details.

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