Allowed code for the tax exemption reason

Error FX-SCH-A-000967 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

A non-empty value in ram:ExemptionReasonCode is not included in the code list used by this rule. An empty value passes this test.

What the rule means

ram:ExemptionReasonCode states a coded reason for tax exemption. A non-empty code must come from the set of values allowed by the rule.

Please use an allowed code for the logistics service tax exemption reason

The stated tax exemption reason is not listed as an allowed code. Use a value permitted by the associated code list.

What to do
  1. Find the relevant ram:ExemptionReasonCode in the tax information for the logistics service.
  2. Replace the non-empty disallowed value with a code included in the associated code list.
  3. Generate the invoice again and validate it again.
Technical details

The test accepts an empty ram:ExemptionReasonCode value or a value included in the code list identified by 48.

Where the rule applies

The rule applies to the value of ram:ExemptionReasonCode within the tax information for a logistics service.

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