To prevent paying taxes twice for the same payment, you can delete the sales receipt, then record a payment upon the invoice.
Before doing so, once you delete a transaction it's irreversible or permanent. This won't appear anywhere on your reports or in your accounts. You can use your Audit Log to recover some information/details, but you're unable to recover the transaction.
Here's how to delete the sales receipt:
Select Sales in the left-hand menu
Click Filter then select the Type: Sales Receipt, then click Apply
Click on the Sales Receipt you wish to delete
At the bottom of the page click on More and select Delete
Select Yes to confirm.
I've included some articles that will guide you in recording customer payments and how to reconcile an account in QuickBooks: