Permitted tax exemption reason

Error FX-SCH-A-000971 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 non-empty value of ram:ExemptionReasonCode is not permitted by the tax exemption reason code list. The test also accepts an empty value.

What the rule means

ram:ExemptionReasonCode identifies the reason for a tax exemption in the tax information. A code that is not permitted cannot be used as a compliant exemption reason.

Please use a permitted tax exemption reason

The tax exemption reason provided is not permitted. A value from the designated code list or an empty value satisfies the test.

What to do
  1. Check the value of ram:ExemptionReasonCode in ram:CategoryTradeTax.
  2. Use a value from the tax exemption reason code list, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test permits an empty value; otherwise, the value of ram:ExemptionReasonCode must be present in code list 25 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule checks ram:ExemptionReasonCode within ram:CategoryTradeTax for a document-level allowance identified in ram:SpecifiedTradeAllowanceCharge by ram:ChargeIndicator having the value false.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ 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]