If the check has not been deposited yet
In the event that you need to void a check your customer has given you, open the cash receipt document and then choose Generate > Void payment. This will open an offsetting journal entry in a new tab for you to review and save. The invoice will also be reopened so you can receive a new payment against it.
If the check has already been included on deposit
A check can no longer be voided once it has been deposited, so the process in this scenario is slightly different.
First, open the deposit and disassociate the cash receipt.
Next, transfer this amount to the G/L Accounts tab of the deposit so that the total is unchanged. This will allow you to still clear the amount on the bank reconciliation and have an accurate audit trail of what happened with the funds.
Finally, open the cash receipt and void it as outlined in the section above. This will reopen the invoice and allow a new payment to be received against it once your customer pays you again.