From a sale's detail page, use Return to take back some items, or Cancel (admins only) to take back everything.

Items go back into stock and the amount is deducted from revenue on the return date. Every operation is recorded in the audit log.