Use an allowed currency code for the source currency

Error FX-SCH-A-000332 Factur-X

Value of 'ram:SourceCurrencyCode' is not allowed.

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

A non-empty value in ram:SourceCurrencyCode is not included in permitted code list 42. This check does not reject an empty value.

What the rule means

The source currency code identifies the currency from which the exchange rate is expressed. A disallowed code cannot reliably identify the currency used in the conversion.

Please use an allowed code for the source currency

The specified source-currency value is not included in the permitted code list. Use an entry from code list 42 for ram:SourceCurrencyCode.

What to do
  1. Check the value in ram:SourceCurrencyCode.
  2. Replace any disallowed value with an entry from code list 42.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty value; otherwise, ram:SourceCurrencyCode must match a value in the enumeration of code list 42.

Where the rule applies

Applies to ram:SourceCurrencyCode in the exchange rate for the tax currency.

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