If the "Subtype of invoice line item" (EXT-FR-FE-163 / BT-X-8) has the value "GROUP" and if the "Invoice line net amount" (BT-131) is specified, all lower levels which has "Subtype of invoice line item" (EXT-FR-FE-163) equal to "GROUP" MUST contain a "Invoice line net amount" (BT-131) value.
At least one directly related child group line with LineStatusReasonCode GROUP has no LineTotalAmount. The test compares the number of directly related group lines with the number of those lines that contain a net amount.
When a group line with a net amount has child group lines, each of those child group lines must also have a net amount.
At least one child group line is missing its net amount. Add the amount to every child group line.
- Find the child
IncludedSupplyChainTradeLineItemlines with aParentLineIDandLineStatusReasonCodeGROUP. - Add
TradeLineItem.LineTotalAmountto each of those group lines. - Regenerate the invoice and validate it again.
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>2</ram:LineID> <ram:ParentLineID>1</ram:ParentLineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation/> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>2</ram:LineID> <ram:ParentLineID>1</ram:ParentLineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>100.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
TradeLineItem.LineTotalAmount(BT-131)AssociatedDocument.LineStatusReasonCode(BT-X-8)LineStatusReasonCodes(BT-X-8)
Technical details
For each LineID, the test counts child lines with the matching ParentLineID and LineStatusReasonCode GROUP, then compares that count with the number containing LineTotalAmount.
The rule applies to an IncludedSupplyChainTradeLineItem group line with LineStatusReasonCode GROUP when the line contains a LineTotalAmount.
rule/@context)assert/@test)