It's not unusual to make sales to people who are not regular customers. These are often drop-ins who you likely will never see again. They're not set up in the system and it's not worth the trouble to do so.
Here's how to handle this situation.
1. Set up a customer account called "Cash Sales" (or some other term that you use to describe this kind of customer).
2. Give this an account number outside of your "normal" customer account number range (like account "2" or account "9999").
3. Whenever you have one of these type of transactions, apply both the sale and the payment to this account.
IMPORTANT: Keep in mind that, by definition, cash accounts MUST always zero-balance. That is, there should NEVER be a sale made without the accompanying payment. Check this at least every month (if not more often) to make sure this is so.
If you have lots of these kinds of transactions (like hundreds per month), you probably want to set up a separate account per month. This will keep the single account from getting too big and unwieldy. For example:
Account # 9001 Cash Sales - January 2001
Account # 9002 Cash Sales - February 2001 etc.