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 value of ram:LineStatusReasonCode is not empty and is not included in the code list allowed for this element. An empty value is permitted by the test condition.

What the rule means

ram:LineStatusReasonCode contains a code for the reason for the invoice line status. A non-empty value must be one of the values allowed by the Factur-X code list.

Please check the reason code `ram:LineStatusReasonCode`

The value of ram:LineStatusReasonCode is not included in the allowed code list. You can resolve this by using an allowed value or leaving the element empty.

What to do
  1. Compare the value of ram:LineStatusReasonCode with the allowed code list, or leave the element empty.
  2. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty value or a value listed in FACTUR-X_EXTENDED_codedb.xml under code list ID 7.

Where the rule applies

The rule applies to ram:LineStatusReasonCode in the document reference of 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]