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 payment until the order is shipped and an invoice is created.
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.
CR - Accounts Receivable - Customer ABC