For each item (BG-25), if the "ID of the parent line" (BT-X-304) is used, the "Subtype of the invoice item" (BT-X-8) must be specified.
When ram:ParentLineID contains a value, the item subtype in ram:LineStatusReasonCode is missing.
The parent line ID links the invoice line to another, higher-level line. The item subtype identifies the type of line and is required when a parent ID is used.
An invoice line refers to a parent line, but its item subtype is missing. Add the detail that identifies the line type.
- In
ram:AssociatedDocumentLineDocument, provideLineStatusReasonCodewhenParentLineIDhas a value. - Check the call to
SetParentLineId(...)and the value ofAssociatedDocument.LineStatusReasonCode. - Regenerate the invoice and validate it again.
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:ParentLineID>1</ram:ParentLineID> </ram:AssociatedDocumentLineDocument> </ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:ParentLineID>1</ram:ParentLineID> <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> </ram:IncludedSupplyChainTradeLineItem>
AssociatedDocument.LineStatusReasonCode(BT-X-8)AssociatedDocument.ParentLineID(BT-X-304)LineStatusReasonCodes(BT-X-8)TradeLineItem.SetParentLineId(parentLineId)(BT-X-304)
Technical details
The XPath permits an empty ram:ParentLineID. Otherwise, ram:LineStatusReasonCode within ram:AssociatedDocumentLineDocument must have a non-empty value.
This rule applies to an invoice line ram:IncludedSupplyChainTradeLineItem when ram:ParentLineID is used in ram:AssociatedDocumentLineDocument.
rule/@context)assert/@test)