Allowed tax exemption reason code

Error FX-SCH-A-000956 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 not included in the value list used by this rule. An empty value is also accepted by the test condition.

What the rule means

The tax exemption reason code must either be empty or match a code allowed by the value list. This restricts the value to those provided for this context.

Please use an allowed tax exemption reason code for the advance payment

The value of ram:ExemptionReasonCode does not match the value list provided for this field. You can change the value or leave it empty.

What to do
  1. Find ram:ExemptionReasonCode in ram:IncludedTradeTax for the advance payment.
  2. Check the code against the code list provided for it.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:IncludedTradeTax>
  <ram:ExemptionReasonCode>INVALID</ram:ExemptionReasonCode>
</ram:IncludedTradeTax>
✓ Correct
<ram:IncludedTradeTax>
  <ram:ExemptionReasonCode/>
</ram:IncludedTradeTax>
Good to know

The test accepts either an empty value or a value included in the code list with identifier 25.

Technical details

The test accepts an empty $codeValue25 value or a value present in the code list with identifier 25.

Where the rule applies

The rule checks the value of ram:ExemptionReasonCode in ram:IncludedTradeTax of an advance payment.

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