Simple accounting question

OK, it’s been awhile since I studied double-entry accounting, and more of it has slipped out my head than I would like to admit. My friend is studying it and hit this scenario:

You are running a store. You sell something.

OK a credit is made to inventory, and a debit to cost of goods sold. That much makes sense. The point of the exercise is that COGS can be computed by FIFO, LIFO, or average cost. Cool, I remember that. However, there is also the matter of the cash that you took in. Where is that accounted for? What’s the “double-entry”?

I told you it was simple, but even so, it’s got me confused. I could use a little boost from the Dopers.

Credit Sales and Debit Cash.

Or if you sold it “on account” instead of for cash, you credit Sales (same as David Simmons posted, and debit Accounts Receivable. Then when the customer pays the invoice, you credit Accounts Receivable and debit Cash.

The end result is the same (credit to Sales and debit to Cash, increasing them both) but A/R acts as a holding account between the time of the sale and when the cash is actually collected. Similar things are often done with credit card sales.