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 must equal the net amounts of the included invoice lines, minus document-level allowances and plus document-level charges. The permitted absolute difference is 0.01 for each included invoice line, allowance, or charge.
BT-109 is the invoice total excluding VAT. It reconciles invoice line net amounts (BT-131) with document-level allowances (BT-92) and charges (BT-99).
The invoice total excluding VAT does not sufficiently match the net amounts of the included invoice lines and the document-level allowances and charges. Check the total against these amounts.
- Compare
ram:TaxBasisTotalAmountwith the includedram:LineTotalAmountvalues of the invoice lines. - Account for document-level allowances and charges using
ram:ActualAmount, and logistics service fees usingram:AppliedAmount. - Check the relevant values through
TaxBasisAmount,LineTotalAmount, andActualAmount. - Generate the invoice again and validate it.
AbstractTradeAllowanceCharge.ActualAmount(Document level allowance: BT-92; Document level charge: BT-99)FacturXInvoice.TaxBasisAmount(BT-109)TradeLineItem.LineTotalAmount(BT-131)
Technical details
The test calculates the sum of ram:LineTotalAmount values from invoice lines with no ram:LineStatusReasonCode or with the value DETAIL, adds allowances from ram:ActualAmount, and subtracts charges from ram:ActualAmount and logistics service fees from ram:AppliedAmount. The permitted absolute difference from ram:TaxBasisTotalAmount is 0.01 multiplied by the number of included lines, allowances, and charges.
Applies to ram:TaxBasisTotalAmount in the monetary summary and compares it with invoice line net amounts and document-level allowances and charges.
rule/@context)assert/@test)