a week ago
Customer has invoice that past due.
Invoice for next month has already been generated but not due for 20 days.
Customer makes payment, but the payment is assigned to the invoice that's not due yet instead of the invoice that's past due.
How can I make sure payments go for past due invoices first and not the invoice that isn't due yet?
For example, when a client clicks "Pay online" button in the email notification showing the new latest invoice, only this invoice is paid. But if the client or administrator just creates a new general payment, it's linked to the oldest unpaid invoice.