Invalid allowance reason code on the gross price

Error FX-SCH-A-001033 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 included in the code list permitted for this field. The test also accepts an empty value.

What the rule means

The reason for the allowance on the gross price must match an allowed code from the designated code list. The code assigns the allowance a standardized reason.

Please provide an allowed reason code for the allowance on the gross price

The allowance reason code on the gross price is not in the permitted code list. You can adjust the field by using an allowed code or leaving it empty.

What to do
  1. Locate ram:ReasonCode in the allowance under ram:GrossPriceProductTradePrice.
  2. Replace its value with a code allowed by the code list, or leave the value empty.
  3. Generate the invoice again and validate it again.
Technical details

The test checks whether the text value of ram:ReasonCode is empty or appears as an enumeration in code list 21.

Where the rule applies

The rule applies to ram:ReasonCode of an allowance within ram:GrossPriceProductTradePrice of an invoice line.

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