Thank you for reaching out to the Community. Yes, you can. However, the payment must be removed temporarily from the deposit in order to make any changes to the sales receipt.
Once deleted, you can start modifying the sales receipt which will affect the payment in Undeposited Fund. Then add it again to the correct deposit.
Here's how:
Click + New.
Choose Bank Deposit.
From the Account ▼ drop-down, select the account you want to put the money into.