You can cancel a manual payment made in error as follows:
Click on the invoice on which the payment was made in error:
In section 3 "Payment calendar" click on the arrow on the payment line and select "void".
Click on "Add a payment" to return this invoice to "unpaid" status in your reports.
Once you have added the new payment line, the calendar will be updated as shown above.
Finally, find the invoice on which you should have made the payment and apply it to balance properly if applicable.