Overpayment on invoices

Could someone be kind enough to explain this to me, please?

When a customer overpays on an invoice, if you go into the receipts and payments option and allocate the payment to the customer, the overpayment does not then show against the next invoice. If, however, you go into the current invoice and remove the invoice number from the payment, then allocate the payment, it then shows as a credit on their next payment. Why is this different please?

First, read the Guide: Resolve overpaid status on sales invoices | Manager. That explains the mechanics of what you are experiencing.

As for the reason, if a customer specifies a payment (which you enter as a receipt) is for a specific invoice, you should keep it that way, not allocate to some other invoice. The customer might have a valid reason not to be making payments against some other invoice, such as contractual terms, etc. So, until the issue can be resolved, you have the ability to allocate the receipt as the customer specified, rather than chasing it through a daisy chain of other transactions. (It will confine the problem.)