How do I credit a deposit to Accounts Receivable and debit the same amount from a sale?
A/R means someone owes you money, which in QB means you have an open invoice.
that invoice uses items, those items are what you sell or do, and they post to the income account you choose in item setup.
Saving the invoice creates the A/R entry, then you receive payment against that invoice, that clears the A/R entry and puts the amount in undeposited funds. When you deposit the funds in the bank you use make deposits to show that you did that in QB.