Invalid exemption reason code on the charge

Error FX-SCH-A-000976 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 neither empty nor included in the permitted code list.

What the rule means

ram:ExemptionReasonCode states the reason for a tax exemption associated with the charge. A permitted code identifies this reason in a standardised way.

Please check the charge’s exemption reason

The value of ram:ExemptionReasonCode for the charge does not match the permitted code list. You can correct the value using the list or leave it empty.

What to do
  1. Check ram:ExemptionReasonCode in the charge’s ram:CategoryTradeTax.
  2. Use a value from the permitted code list or leave the value empty.
  3. Regenerate the invoice and check it again.
Technical details

The test accepts an empty code or a value from code list 25 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:ExemptionReasonCode within ram:CategoryTradeTax of a document-level charge in ram:SpecifiedTradeAllowanceCharge.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ ram:CategoryTradeTax/ram:ExemptionReasonCode
Test expression (assert/@test)
string-length($codeValue25)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=25]/enumeration[@value=$codeValue25]