Prepayment in other account

Hello I have a question regarding a prepayment that was entered under the wrong account 

and now the customer under the correct account was invoiced

how do I apply that prepayment to the correct invoice?