If you have a situation where a member leaves and you need to apply some of the retainer you have on file to an outstanding balance, you can take the following steps:
Use the deposit offset button within the Accounts Receivable page to MOVE the retainer amount in Operate from the GL deposit account it was originally billed to, to the cash account (creating a credit on the member account and removing the deposit).
You might want to reference that the deposit is being offset to the final customer balance or the invoice number it will be applied to.
On your AR you will now see a journal DEBIT which is effectively removing the deposit amount from the GL account and a journal CREDIT creating the credit on account to cash.
You will then need to add an additional journal CREDIT to apply the newly created credit on account to the outstanding invoice. Read more about Journals.
For journal credits, you must add the Amount in the corresponding box, then use the Allocate button to pay the invoice in full or you can allocate the entire amount you have entered above to one invoice or split it into smaller amounts and allocated to multiple invoices.
Again, you may want to add in the reference field that this credit is from the deposit to be applied to outstanding invoice #XXX
This will then effectively zero out the customer balance and also the deposit on file that they paid because you have re-allocated that paid deposit amount to the outstanding balance, while creating the relevant journal entries to remove the deposit GL revenue initially charged to the customer, and re-allocate the payment made for that initial charge to the outstanding balance.