If Invoice Total VAT amount (BT-110) ,where currency (BT-110-0) is equal to BT-5, is present, then the Absolute Value of (Invoice total amount with VAT (BT-112) - Invoice total amount without VAT (BT-109) - Invoice total VAT amount (BT-110)) <= 0,01 * (Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charges amounts (BT-99) + Number of Logistics Service fee amounts (BT-X-272). Else, Invoice total amount with VAT (BT-112) is equal to Invoice total amount without VAT (BT-109).
If exactly one ram:TaxTotalAmount in the invoice currency is present, ram:GrandTotalAmount does not equal ram:TaxBasisTotalAmount plus that VAT amount within the permitted tolerance. If no matching VAT amount or more than one is present, ram:GrandTotalAmount must equal ram:TaxBasisTotalAmount exactly.
The invoice total with VAT is derived from the amount without VAT and the VAT amount in the invoice currency. If there is no single VAT amount in that currency, the total must not differ from the amount without VAT.
The invoice total with VAT does not match the tax basis and VAT amount in the invoice currency. You can compare the amounts and check how many tax amounts are present in that currency.
- Compare
FacturXInvoice.GrandTotalAmountwithFacturXInvoice.TaxBasisAmountand theFacturXInvoice.TaxTotalAmountin the invoice currency. - Check whether exactly one tax amount uses the currency from
FacturXInvoice.Currency; otherwise, the total and tax basis amounts must be equal. - Generate the invoice again and validate it once more.
AbstractTradeAllowanceCharge.ActualAmount(Document level allowance: BT-92; Document level charge: BT-99)FacturXInvoice.Currency(Invoice currency: BT-5)FacturXInvoice.GrandTotalAmount(BT-112)FacturXInvoice.TaxBasisAmount(BT-109)FacturXInvoice.TaxTotalAmount(BT-110)
Technical details
The XPath counts ram:TaxTotalAmount elements whose currencyID matches ram:InvoiceCurrencyCode. With exactly one match, it checks the difference between ram:GrandTotalAmount, ram:TaxBasisTotalAmount, and the matching tax amount against a tolerance based on lines and charges; otherwise, it requires the total and tax basis amounts to be equal.
The rule applies to ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares ram:GrandTotalAmount with the amount without VAT and the VAT amount in the invoice currency.
rule/@context)assert/@test)