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.
If ParentLineID contains a value, LineStatusReasonCode must also be provided. The invoice line has a parent line identifier but no subtype.
ParentLineID associates the invoice line with a parent line. The subtype identifies the kind of invoice line.
An invoice line refers to a parent line using ParentLineID, but LineStatusReasonCode is missing. You can resolve this by providing the subtype.
- Check the parent line identifier in
AssociatedDocument.ParentLineID. - Provide
AssociatedDocument.LineStatusReasonCodefor this invoice line. - Regenerate the invoice and validate it again.
<ram:AssociatedDocumentLineDocument> <ram:ParentLineID>1</ram:ParentLineID> </ram:AssociatedDocumentLineDocument>
<ram:AssociatedDocumentLineDocument> <ram:ParentLineID>1</ram:ParentLineID> <ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument>
AssociatedDocument.LineStatusReasonCode(BT-X-8)AssociatedDocument.ParentLineID(BT-X-304)LineStatusReasonCodes(BT-X-8)TradeLineItem.SetParentLineId(parentLineId)(BT-X-304)
Technical details
The test passes when ParentLineID is empty, or when LineStatusReasonCode is also non-empty if ParentLineID is not empty.
The rule applies to each invoice line in IncludedSupplyChainTradeLineItem, especially to AssociatedDocumentLineDocument.
rule/@context)assert/@test)