Invalid exemption reason code

Error FX-SCH-A-000510 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 code list allowed for this element.

What the rule means

ram:ExemptionReasonCode identifies the reason for a tax exemption in the VAT breakdown. An allowed code represents that reason in a standardized way.

Please use an allowed tax exemption reason code

The VAT breakdown contains a value in ram:ExemptionReasonCode that is not allowed. You can use a value from the designated code list or leave the element empty.

What to do
  1. Locate ram:ExemptionReasonCode in the VAT breakdown.
  2. Check the value against the designated code list.
  3. Use a value listed there or leave ram:ExemptionReasonCode empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value listed in FACTUR-X_BASIC_codedb.xml under code list ID 19.

Where the rule applies

The rule applies to ram:ExemptionReasonCode in the document-level VAT breakdown.

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