Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).
The amount in the invoice-total ram:LineTotalAmount does not equal the sum of all invoice-line ram:LineTotalAmount values after the line amounts have been summed and rounded to two decimal places.
BT-106 must represent the sum of the net amounts of all invoice lines, BT-131. This keeps the invoice’s stated net total consistent with its individual lines.
The invoice net amount does not match the sum of the net amounts of its invoice lines. You can correct the invoice total or the line amounts accordingly.
- Compare
FacturXInvoice.LineTotalAmountwith the sum of the line amounts. - Check the
TradeLineItem.LineTotalAmountvalues for all invoice lines. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:LineTotalAmount>29.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:IncludedSupplyChainTradeLineItem> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>10.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem> <ram:IncludedSupplyChainTradeLineItem> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>20.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:LineTotalAmount>30.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:IncludedSupplyChainTradeLineItem> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>10.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem> <ram:IncludedSupplyChainTradeLineItem> <ram:SpecifiedLineTradeSettlement> <ram:SpecifiedTradeSettlementLineMonetarySummation> <ram:LineTotalAmount>20.00</ram:LineTotalAmount> </ram:SpecifiedTradeSettlementLineMonetarySummation> </ram:SpecifiedLineTradeSettlement> </ram:IncludedSupplyChainTradeLineItem>
FacturXInvoice.LineTotalAmount(BT-106)TradeLineItem.LineTotalAmount(BT-131)
Technical details
The test compares the invoice-level ram:LineTotalAmount with the sum of the line values, rounded to two decimal places before comparison.
The rule applies to the invoice total in ram:SpecifiedTradeSettlementHeaderMonetarySummation and the net amounts of the corresponding ram:IncludedSupplyChainTradeLineItem invoice lines.
rule/@context)assert/@test)