Let me help you sort out your concern, Userhuini.
It looks like the advanced payment is a retainer. You'll have to add the deposit to the separate trust account first. Then, when you create the invoice, you can use the payment to pay the transaction.
You can refer to these articles for more information:
If there's anything else that you need, don't hesitate to let us know. We're right here to help you. Take care!