Invoice line document identifier

Error FX-SCH-A-000270 Factur-X

Element 'ram:LineID' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:LineID does not occur exactly once in ram:AssociatedDocumentLineDocument. The identifier is either missing or present more than once.

What the rule means

ram:LineID contains the invoice line identifier in its associated document section. It must be provided exactly once there.

Please provide exactly one identifier for the invoice line document

ram:LineID is missing from the invoice line’s document section or appears more than once. The identifier must occur exactly once there.

What to do
  1. Find the affected ram:AssociatedDocumentLineDocument.
  2. Check that it contains exactly one ram:LineID.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:AssociatedDocumentLineDocument/>
✓ Correct
<ram:AssociatedDocumentLineDocument>
  <ram:LineID/>
</ram:AssociatedDocumentLineDocument>
Technical details

In the context of ram:AssociatedDocumentLineDocument, the rule checks whether the number of direct ram:LineID elements equals 1.

Where the rule applies

The rule applies in the invoice line’s document section (ram:AssociatedDocumentLineDocument).

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:AssociatedDocumentLineDocument
Test expression (assert/@test)
count(ram:LineID)=1