Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) - Paid amount (BT-113) + Rounding amount (BT-114) + Σ Third party payment amount (BT-DEX-002).
The value of cbc:PayableAmount, adjusted by the rounding amount, does not match the tax-inclusive amount minus the prepaid amount plus the third-party payment amount. The rounding amount is then added to the amount due.
The amount due must correctly account for the total including VAT, amounts already paid, third-party payments, and rounding. This ensures that the stated amount due matches the amount still payable.
The amount due in cbc:PayableAmount does not match the total, prepaid, third-party payment, and rounding amounts. You can adjust the amounts so that they reconcile.
- Compare the amount due with the total including VAT, minus prepaid amounts, plus third-party payments.
- Check the values of
DuePayableAmount,GrandTotalAmount,RoundingAmount, andTotalPrepaidAmount. - Account for the rounding amount when reconciling the totals.
- Regenerate the invoice and check it again.
FacturXInvoice.DuePayableAmount(BT-115)FacturXInvoice.GrandTotalAmount(BT-112)FacturXInvoice.RoundingAmount(BT-114)FacturXInvoice.TotalPrepaidAmount(BT-113)
Technical details
The XPath compares the two amounts rounded to two decimal places: cbc:PayableAmount minus the rounding amount, and cbc:TaxInclusiveAmount minus prepaid amounts plus third-party payments.
The rule applies to the totals in cac:LegalMonetaryTotal.
rule/@context)assert/@test)