1. The following GL Entry is created when a payment is recorded for a sales order:
CR - Customer Deposit Account - Customer ABC
Customer Deposit Account
Each customer automatically has a sub account under the system GL account Customer Deposits. Customer Deposits is a liability account. This is used to hold the paid amount until the order is shipped and an invoice is created. When invoice is created, the invoiced amount is then recognized as revenue.
2. When Sales Order is invoiced and Invoice is posted, this entry is created.
CR - Revenue
3. When Sales Order is Invoiced and The Deposit is applied to the invoice. After the invoice is created, you need to choose to apply the deposit to the invoice. If the invoiced amount is the same as the order amount , the entire payment on the order will net amount owing on the invoice to zero. See here on how to do it. If the invoiced amount is less than the deposit amount, the the remaining deposit amount can be used to apply against future invoices created against this customer.
CR - Accounts Receivable - Customer ABC