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 subordinate invoice line with ram:LineStatusReasonCode equal to GROUP has no ram:LineTotalAmount. The parent group line already contains a net amount.
When a group line has a net amount, every directly subordinate group line must also have a net amount. This ensures that net amounts are stated at the nested group levels.
A child group line has no net amount even though the parent group line has one. Add the missing amount to each directly subordinate group line.
- Find the group line that has a
ram:LineTotalAmount. - Check its child group lines using their
ram:ParentLineIDandram:LineStatusReasonCode. - Set the net amount using
TradeLineItem.LineTotalAmount. - Generate the invoice again and validate it.
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>1</ram:LineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>100.00</ram:LineTotalAmount> </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:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>1</ram:LineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>100.00</ram:LineTotalAmount> </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>60.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 the current ram:LineID, the test counts invoice lines with a matching ram:ParentLineID and ram:LineStatusReasonCode equal to GROUP, then compares that count with the number of those lines containing ram:LineTotalAmount.
The rule applies to an ram:IncludedSupplyChainTradeLineItem with ram:LineStatusReasonCode equal to GROUP and a present ram:LineTotalAmount. It checks the directly subordinate group lines using ram:ParentLineID.
rule/@context)assert/@test)