Invalid reason code without a list identifier

Error FX-SCH-A-000978 Factur-X

Value of 'ram:ReasonCode[not (@listID)]' 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 without a listID attribute is neither empty nor included in the corresponding Factur-X code list. The specified reason code is therefore not allowed.

What the rule means

The reason code describes the reason for the allowance. An allowed code enables standardized transmission of this reason.

Please check the allowance’s reason code without a list identifier

The allowance’s reason code is not recognized as an allowed value in the invoice. This check applies to ram:ReasonCode without listID.

What to do
  1. Locate ram:ReasonCode on the allowance that has no listID attribute.
  2. Check whether its value is included in the applicable code list.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value present in code list 46 in FACTUR-X_EXTENDED_codedb.xml. The context excludes ram:ReasonCode elements with listID.

Where the rule applies

The rule applies to ram:ReasonCode without a listID attribute on a document-level allowance.

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