Partial refunds, by item or by amount
A refund can be the whole sale, some of its items, or an amount. An item's refund is its share of what it came to after discounts, with its tax, and the last of a line takes whatever is left, so the cents never drift.
Refunding an item undoes what it set in motion. A refunded course is canceled, unless it already has sessions booked. A refunded gift voucher sold on the sale is canceled, unless it has been spent. Products can go back onto the batches they were sold from when 'Put back on the shelf' is ticked (see stock control).