Invalid tax exemption reason code

Error FX-SCH-A-001130 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 in ram:ExemptionReasonCode is not included in the value list allowed for this element. This check permits an empty value.

What the rule means

ram:ExemptionReasonCode specifies a tax exemption reason as a code. A code that is not allowed cannot be assigned unambiguously to a supported exemption reason.

Please use an allowed code for the tax exemption reason

The value provided in ram:ExemptionReasonCode is not an allowed tax exemption reason. You can correct the entry using the value list defined for this element; this check accepts an empty value.

What to do
  1. Locate the ram:ApplicableTradeTax tax information on the invoice line.
  2. Check the value of ram:ExemptionReasonCode against the value list defined for it.
  3. Generate the invoice again and validate it once more.
Technical details

The check accepts an empty value or a value present in the code list for ram:ExemptionReasonCode.

Where the rule applies

The rule applies to ram:ExemptionReasonCode within the ram:ApplicableTradeTax tax information on an invoice line.

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