Allowed value for ram:LineStatusCode

Error FX-SCH-A-000334 Factur-X

Value of 'ram:LineStatusCode' 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:LineStatusCode 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:LineStatusCode contains a code for the status of the invoice line in the document reference. A non-empty value must be one of the values allowed by the Factur-X code list.

Please check the status code `ram:LineStatusCode`

The value of ram:LineStatusCode 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:LineStatusCode 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 6.

Where the rule applies

The rule applies to ram:LineStatusCode in the document reference of an invoice line.

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