Invalid tax exemption reason code

Error FX-SCH-A-000589 Factur-X

Value of 'ram:ExemptionReasonCode' 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:ExemptionReasonCode is not included in the corresponding code list. The test also accepts an empty value.

What the rule means

ram:ExemptionReasonCode provides the coded reason for a tax exemption. A value that is not listed can prevent the reason from being classified unambiguously.

Please check the tax exemption reason code

The value of ram:ExemptionReasonCode is not included in the applicable code list. You can update the code in this field.

What to do
  1. Find ram:ExemptionReasonCode in the VAT entry at document level.
  2. Check the code against the allowed values.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value present in the code list with ID 26.

Where the rule applies

The rule applies to ram:ExemptionReasonCode within a VAT entry at document level.

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