I a typical workflow you would do the following:
- Create an Invoice (Debit Accounts Receivable / Credit Income)
- Receive a Cash Receipt (Debit Undeposited Funds / Credit Accounts Receivable)
- Deposit receipts (Debit Bank / Credit Undeposited Funds)
It's possible to record a payment using just a Deposit document by recording the following transaction in the Accounts section - Debit Bank / Credit Income. But do this only if you don't need to track who is source of the payment, what invoice was paid, and what's the cost of goods sold.
The best solution might be using the Cash Receipt document - it creates the same transaction - Dr Bank / Cr Income, at the same time recording the Customer, and costs of goods sold (for inventory).