Allowed reason code for the charge

Error FX-SCH-A-000548 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 @listID is not included in the code list used by this rule. The test accepts an empty value.

What the rule means

The reason code describes the reason for the charge. The rule restricts non-empty values to the specified code list.

Please use an allowed reason code for the charge

The value entered for ram:ReasonCode on the charge is not recognized as allowed by this rule. You can use an allowed code; an empty value is also accepted.

What to do
  1. Check the value in ram:ReasonCode of the charge that has no @listID.
  2. Use a value allowed by the code list, or leave the value empty.
  3. Generate the invoice again and validate it once more.
Technical details

The test passes if the checked code value is empty or occurs in the code list identified by 10. The context excludes ram:ReasonCode elements with @listID.

Where the rule applies

The rule applies to ram:ReasonCode without a @listID attribute on a charge at invoice line level.

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