Absolute Value of (Sum of Invoice line net amount (BT-106) - Σ Invoice line net amounts (BT-131))<= 0,01 * Number of line net amounts (BT-131).
The document-level net amount differs from the sum of the included invoice line net amounts by more than the permitted tolerance. The tolerance is 0.01 multiplied by the number of all ram:IncludedSupplyChainTradeLineItem entries.
The document-level net amount is expected to match the sum of the invoice line net amounts, subject to the explicitly permitted rounding tolerance.
The invoice header net amount differs from the sum of the included invoice line net amounts by more than permitted. Check the header value and line amounts together.
- Compare
FacturXInvoice.LineTotalAmountwith the sum of the values fromTradeLineItem.LineTotalAmount. - For the sum, include only invoice lines without
ram:LineStatusReasonCodeor with reasonDETAIL. - Allow for the permitted difference of 0.01 per included
ram:IncludedSupplyChainTradeLineItem. - Generate the invoice again and validate it.
FacturXInvoice.LineTotalAmount(BT-106)TradeLineItem.LineTotalAmount(BT-131)
Technical details
The test sums ram:LineTotalAmount values rounded to two decimal places for line items without ram:LineStatusReasonCode or with reason DETAIL. It compares the sum with the header value and allows an absolute difference of at most 0.01 multiplied by the count of all ram:IncludedSupplyChainTradeLineItem entries.
The rule applies to ram:LineTotalAmount within ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares it with the net amounts of the related ram:IncludedSupplyChainTradeLineItem entries.
rule/@context)assert/@test)