In our application, the user have to ways to apply the deposit to the invoice.
The first way is when you do a shipment to the customers.
On the +New Shipment page when Post Shipment there is a checkbox to select -> Apply Deposit to Posted Invoice from a Prepaid Order. The apply deposit option can only be checked is the Post Invoice After Saving option is selected.
Another way to apply the deposit to the invoice is on the Receive Payment page (Invoices -> Receive Payment).
1) Choose APPLY DEPOSIT from Receive To Account.
2) Choose currency
3) Choose customer
4) Select Payment Method
5) Enter Payment Reference
6) In Open Invoices section, select the invoices to which you want to apply the deposit
7) Check the Amount to apply against invoices.
8) Click on the Post Payment Receipt button