Invalid exemption reason code on an allowance

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 applicable Factur-X code list. Therefore, the specified exemption reason code is not allowed.

What the rule means

The code identifies the exemption reason for the allowance’s tax details. An allowed code ensures that this reason is transmitted in a standardized form.

Please check the allowance’s exemption reason code

The allowance’s exemption reason code is not recognized as an allowed value in the invoice. You can check it against the applicable code list.

What to do
  1. Locate ram:ExemptionReasonCode in the allowance’s tax details.
  2. Check whether its value is included in the applicable code list.
  3. Generate the invoice again and validate it once more.
Technical details

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

Where the rule applies

The rule applies to ram:ExemptionReasonCode within the tax details of a document-level allowance.

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]