Use an allowed currency code for the tax total

Error FX-SCH-A-000045 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 in the code list used by this rule. The test also permits an empty value.

What the rule means

The currency code associates the tax total with a currency. An allowed code enables the amount to be interpreted unambiguously.

Please use an allowed currency code for the tax total

The currency code on ram:TaxTotalAmount does not match the code list used by this check. An empty value is also accepted by this check.

What to do
  1. Check the currencyID attribute on the ram:TaxTotalAmount in the invoice currency.
  2. Use a value from the applicable code list, or leave the value empty.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty currencyID value or a value listed as an enumeration in FACTUR-X_MINIMUM_codedb.xml under cl[@id=7].

Where the rule applies

The currencyID attribute is checked on ram:TaxTotalAmount in the invoice currency within the totals.

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