Finance Charges
If finance charges were applied to an invoice, and the payment is not fully applied after paying tax, it is then applied to the finance charges.
Once the finance charges are paid, any remaining amount is applied to the invoice total. If the payment is not sufficient to cover the finance charges, it will pay as much of the finance charge as is available, and none of the payment is applied to the invoice total.