I'll walk you through on how you can mark an invoice as paid without affecting your bank balance.
You'll first need to create a credit memo. You can link this transaction later on to your invoice to close it.
Now, we need to link this to the invoice. Follow the steps below:
Following the sets of steps provided above, you'll have recorded a payment to an invoice without affecting your bank balance.
It would still be best to link the actual payment for this invoice. If it was recorded as a deposit, you can follow the steps in this article: How to link a deposit to an invoice.
Feel free to place a comment below if you have any other questions in mind. I'll get back to you as soon as I can.