Use an allowed tax exemption reason code

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

The non-empty value of ram:ExemptionReasonCode is not present in the code list used by this rule. An empty value is also allowed by the test condition.

What the rule means

ram:ExemptionReasonCode contains a coded reason for a tax exemption. A non-empty value must match the allowed code list.

Please use an allowed tax exemption reason code

The value entered for ram:ExemptionReasonCode is not recognized as an allowed code. You can use a code from the specified code list; the test condition also allows an empty value.

What to do
  1. Check the value of ram:ExemptionReasonCode in ram:AppliedTradeTax.
  2. Use a value allowed by the code list, or leave the value empty.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeTax>
  <ram:ExemptionReasonCode>NOT-A-CODE</ram:ExemptionReasonCode>
</ram:AppliedTradeTax>
✓ Correct
<ram:AppliedTradeTax>
  <ram:ExemptionReasonCode/>
</ram:AppliedTradeTax>
Technical details

The Schematron test accepts an empty value or a value listed in code list 48 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the value of ram:ExemptionReasonCode in ram:AppliedTradeTax for a document-level logistics service charge.

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]