Disallowed reason code for the charge

Error FX-SCH-A-000390 Factur-X

Value of 'ram:ReasonCode[@listID="5153"]' 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:ReasonCode is not empty and is not allowed by the code list applicable to listID="5153". An empty value passes this check.

What the rule means

The reason code describes why the charge is applied. A disallowed code cannot identify the reason according to the intended code list.

Please use an allowed reason code for the charge

The reason code provided for the charge is not allowed by its associated code list. You can adjust the value or leave the element empty.

What to do
  1. Find the ram:ReasonCode element with listID="5153" in the charge.
  2. Compare its value with the codes allowed by this code list.
  3. Adjust the value or leave ram:ReasonCode empty.
  4. Generate the invoice again and validate it.
Technical details

The XPath allows an empty ram:ReasonCode or requires its value to occur in the code list identified by 47.

Where the rule applies

The rule applies to ram:ReasonCode with the attribute listID="5153" within a document-level ram:SpecifiedTradeAllowanceCharge marked as a charge.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ ram:ReasonCode[@listID="5153"]
Test expression (assert/@test)
string-length($codeValue47)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=47]/enumeration[@value=$codeValue47]