Absolute Value of (Invoice total amount without VAT (BT-109) - ∑ Invoice line net amounts (BT-131) + Σ Document level allowance amounts (BT-92) - Σ Document level charge amounts (BT-99)) <= 0,01 * (Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charge amounts (BT-99)).
ram:TaxBasisTotalAmount differs from the sum of invoice line net amounts minus document-level allowances plus document-level charges by more than the permitted tolerance. The tolerance is 0.01 for each included invoice line, allowance, and charge.
The amount without VAT represents the invoice line net amounts after document-level allowances and charges have been applied. It is the basis for the subsequent tax amounts.
The invoice total without VAT does not agree sufficiently with the invoice line net amounts and the document-level allowances and charges. You can compare the components of the amount.
- Compare
FacturXInvoice.TaxBasisAmountwith the includedTradeLineItem.LineTotalAmountvalues. - Subtract the
AbstractTradeAllowanceCharge.ActualAmountamounts for allowances and include the amounts for charges and logistics service fees. - Generate the invoice again and validate it once more.
AbstractTradeAllowanceCharge.ActualAmount(Document level allowance: BT-92; Document level charge: BT-99)FacturXInvoice.TaxBasisAmount(BT-109)TradeLineItem.LineTotalAmount(BT-131)
Technical details
The test compares ram:TaxBasisTotalAmount with the sum of included ram:LineTotalAmount values, minus allowance amounts and plus charge and logistics service fee amounts. Amounts are rounded to two decimal places; the tolerance scales with the number of included entries.
The rule applies to ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares ram:TaxBasisTotalAmount with invoice line net amounts, document-level allowances, and document-level charges.
rule/@context)assert/@test)