Allowed currency identifier for the tax amount in tax currency

Error FX-SCH-A-001007 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 neither empty nor included in the code list defined for it. This rule’s context concerns the tax amount whose currency identifier matches ram:TaxCurrencyCode.

What the rule means

The currency identifier associates the reported tax amount with the tax currency. A value that is not allowed can prevent the amount from being interpreted unambiguously.

Please use an allowed currency identifier for the tax amount in tax currency

The currency identifier on the tax amount is not recognized as an allowed value. In this rule context, it must also match the tax currency.

What to do
  1. Find ram:TaxTotalAmount in the VAT breakdown at document level.
  2. Check that @currencyID is empty or an allowed value.
  3. Make sure @currencyID matches ram:TaxCurrencyCode.
  4. Generate the invoice again and validate it.
Technical details

The test accepts the value of @currencyID when it is empty or appears in the enumeration of code list ID 50 in FACTUR-X_EXTENDED_codedb.xml. The rule context also ties the attribute to ram:TaxCurrencyCode.

Where the rule applies

The rule applies to @currencyID on ram:TaxTotalAmount in the VAT breakdown at document level when the identifier matches ram:TaxCurrencyCode.

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