Either could be right. It depends on whether the customer was a cash customer who would be given cash, or a credit customer who would have his/her account credited.
Even cash-based businesses issue invoices and credit notes to document sales and returns.