Allowed value for ram:LineStatusReasonCode

Error FX-SCH-A-000335 Factur-X

Value of 'ram:LineStatusReasonCode' 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 non-empty value of ram:LineStatusReasonCode is not included in the code list specified for this code.

What the rule means

If provided, the status reason code must conform to the specified code list. This check permits an empty value.

Please use an allowed reason code for the invoice line status

The value in ram:LineStatusReasonCode is not listed as an allowed reason code. If you provide a value, it must belong to the specified code list.

What to do
  1. Check the value in ram:LineStatusReasonCode.
  2. Compare the non-empty value with the values allowed for this reason code.
  3. Regenerate the invoice and check it again.
Technical details

The test permits an empty value or requires the value to be listed in FACTUR-X_EXTENDED_codedb.xml in the code list with identifier 7.

Where the rule applies

The rule applies to ram:LineStatusReasonCode on the document associated with an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode
Test expression (assert/@test)
string-length($codeValue7)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=7]/enumeration[@value=$codeValue7]