If the "Subtype of invoice item" (BT-X-8) has the value "Subtotal" (GROUP) and the "Net amount of the invoice item" (BT-131) is specified, it must correspond to the sum of the BT-131 of the next lower levels for which the "Subtype of the invoice item" (BT-X-8) has the value "Regular item (standard case)" (DETAIL) or "Subtotal" (GROUP). As a consequence, all lower levels shall contain a BT-131 value, when BT-X-8 has the value DETAIL or GROUP.
If LineStatusReasonCode has the value GROUP and LineTotalAmount is provided, that amount must equal the sum of the LineTotalAmount values of directly associated lines with subtype DETAIL or GROUP. The test rounds the sum to two decimal places.
The net amount of a subtotal must match the net amounts of its associated subordinate invoice lines. This maintains the arithmetic consistency of the line hierarchy.
The net amount of an invoice line marked GROUP does not match the amounts of its directly subordinate lines. Adjust the amount or the amounts of the associated lines.
- Check the
LineTotalAmountvalue on the subtotal. - Compare it with the
LineTotalAmountvalues of directly associated lines markedDETAILorGROUP. - Make sure each of those lines has a net amount.
- Regenerate the invoice and validate it again.
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>1</ram:LineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>10.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>DETAIL</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>4.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <ram:AssociatedDocumentLineDocument> <ram:LineID>1</ram:LineID> <ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>4.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>DETAIL</ram:LineStatusReasonCode> </ram:AssociatedDocumentLineDocument> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>4.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
AssociatedDocument.LineStatusReasonCode(BT-X-8)LineStatusReasonCodes(BT-X-8)TradeLineItem.LineTotalAmount(BT-131)
Technical details
The test compares a line’s LineTotalAmount with the sum, rounded to two decimal places, of lines whose ParentLineID matches that line’s LineID and whose LineStatusReasonCode is DETAIL or GROUP.
The rule applies to invoice lines in IncludedSupplyChainTradeLineItem. It checks the amount of a line marked GROUP against its directly subordinate lines.
rule/@context)assert/@test)