Use an allowed currency code in @currencyID for the invoice currency

Error FX-SCH-A-001142 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 @currencyID on ram:TaxTotalAmount is not present in the code list used for this check. An empty value also passes the test.

What the rule means

The code list ensures that the currency code belongs to the set of values defined for this rule.

Please use an allowed currency code for the tax amount

The value of @currencyID on ram:TaxTotalAmount does not match an entry in the code list used for this check. You can adjust the value or leave the attribute empty.

What to do
  1. Find the relevant ram:TaxTotalAmount in the invoice line summation.
  2. Check the @currencyID value against the code list used by this rule, or leave it empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value present in codedb/cl[@id=31]/enumeration.

Where the rule applies

The rule applies to the @currencyID attribute of ram:TaxTotalAmount in an invoice line summation when it is associated with the invoice currency.

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