Invalid allowance reason code

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

The value of ram:ReasonCode is neither empty nor included in the permitted code list.

What the rule means

ram:ReasonCode identifies the reason for the allowance. A permitted code allows this reason to be stated in a standardised way.

Please check the reason for the allowance

The value of ram:ReasonCode for the allowance does not match the permitted code list. You can correct the value using the list or leave it empty.

What to do
  1. Check ram:ReasonCode in the allowance’s ram:SpecifiedTradeAllowanceCharge.
  2. Use a value from the permitted code list or leave the value empty.
  3. Regenerate the invoice and check it again.
Technical details

The test accepts an empty code or a value from code list 45 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:ReasonCode of a document-level allowance within 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]