By standard process, once a deposit is created for a sales order, the customer deposit will automatically be applied to the invoice upon billing the order. If the Customer Deposit is still open after billing the sales order, check the system notes to see who billed the sales order.
The user should have Deposit Application permission for him to be able to apply the customer deposit to the invoice automatically. Otherwise, user needs to manually apply the Customer Deposit to the Invoice record through the New Payment page.
1. Navigate to Transactions > Customers > Accept Customer Payments.
2. Set the name on the Customer field.
3. Under Apply tab > Invoices sub tab, mark the invoice record.
4. Under Apply tab > Deposits sub tab, mark the Apply box beside the Customer Deposit.
5. Hit Save.