You can reverse a prepayment applied to an invoice by using Adjust Receivables and entering a Negative amount against the Prepayment (Customer Deposit) account.
Highlight the prepayment line. Enter a description and memo.
Credit and Applied amounts will be negative. Offset account should be prepayment from customers (see your GL#). Click OK. The prepayment will disappear and the original invoice amount will remain. At this point you can void the invoice if incorrect.