There seems to be a bug with how the invoices are marked as overpaid.
In my case, i have never selected any invoice when recording a receipt. (i have checked again just to be sure).
but even then, when a credit note is recorded with the relevant invoice selected, the same is shown as overpaid in the sales invoices tab.
there are no issues if the invoice is not selected in the credit notes tab. but selecting the invoice is necessary in most cases.