Each "ID of parent line" (BT-X-304) must refer to an existing "ID of invoice item" (BT-126).
The value in ram:ParentLineID does not match any invoice line’s ram:LineID. As a result, the specified parent line does not refer to an existing invoice line.
The parent line identifier establishes a relationship between invoice lines. It must identify an existing invoice line so that the relationship can be resolved.
The specified parent line was not found among the invoice lines. You can correct the link by using an existing line identifier.
- Find the relevant
ram:ParentLineIDin the invoice line. - Check the related
ram:LineIDandram:ParentLineIDinAssociatedDocument. - Check the call to
SetParentLineId(...). - Generate the invoice again and validate it.
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>10</ram:LineID> <ram:ParentLineID>99</ram:ParentLineID> </ram:AssociatedDocumentLineDocument> </ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>10</ram:LineID> </ram:AssociatedDocumentLineDocument> </ram:IncludedSupplyChainTradeLineItem> <ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>20</ram:LineID> <ram:ParentLineID>10</ram:ParentLineID> </ram:AssociatedDocumentLineDocument> </ram:IncludedSupplyChainTradeLineItem>
AssociatedDocument.LineID(BT-126)TradeLineItem.AssociatedDocument(BT-126)AssociatedDocument.ParentLineID(BT-X-304)TradeLineItem.SetParentLineId(parentLineId)(BT-X-304)
Technical details
The test compares the normalized value of ram:ParentLineID with the normalized values of all ram:LineID elements under ram:IncludedSupplyChainTradeLineItem.
The rule applies to ram:IncludedSupplyChainTradeLineItem when it contains a ram:ParentLineID. That value must match a ram:LineID of an invoice line.
rule/@context)assert/@test)