Creating a credit nota

The problem is not the client’s balance, but the old invoice that still is listed under Invoices overdue:

This is the credit note:
Credit nota

As you can see I cannot mark it as payed. This is because I tried adding payed with a negative “Apply credit” but then I removed this “payment” again.

This is the credit nota, where you can see it has the label PAYED:
Credit nota marked as payed

The old invoice, with a different ID then the credit nota, it still displayed under invoices OVER DUE and sending reminders:
Original invoice