Allowed reason code for the allowance

Error FX-SCH-A-000973 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

If ram:ReasonCode contains a value, that value must be included in the code list used by this rule. The test also accepts an empty value.

What the rule means

An allowed reason code assigns the allowance to a recognized reason. A value not listed cannot be matched using this code list.

Please use an allowed reason code for the allowance

The value provided in ram:ReasonCode is not included in the applicable code list. You can change the value or leave the element empty.

What to do
  1. Check the value in ram:ReasonCode for the allowance.
  2. Use a value from the code list applicable to this rule, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty string value or a value present in the code list identified by 45.

Where the rule applies

The rule applies to ram:ReasonCode of a document-level allowance in ram:SpecifiedTradeAllowanceCharge.

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