Invalid allowance reason code

Error FX-SCH-A-001137 Factur-X

Value of 'ram:ReasonCode' 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 in the permitted code list for this field. An empty value is permitted by the test condition.

What the rule means

ram:ReasonCode identifies the reason for the allowance. A disallowed code does not identify that reason according to the prescribed code list.

Please use an allowed `ram:ReasonCode` for the allowance

The reason code for the allowance on the invoice line is not allowed. You can adjust the code or leave the value empty.

What to do
  1. Locate ram:ReasonCode in the relevant ram:SpecifiedTradeAllowanceCharge on the invoice line.
  2. Check the code against the code list permitted for this field.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value included in the code list with ID 28.

Where the rule applies

The rule applies to ram:ReasonCode of an allowance on an invoice line whose ram:ChargeIndicator has the value false.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator="false"]/ram:ReasonCode
Test expression (assert/@test)
string-length($codeValue28)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=28]/enumeration[@value=$codeValue28]