Sebastian Vetter
044358e29d
Add fix for OrderDiscount model when offer deleted
The OrderDiscount did not store (a copy) of the offer
name within a separate field which causes an issue when the
offer is deleted. E.g. it breaks the order history view for
the customer because no offer data is available.
I have added a new field to OrderDiscount that is automatically
populated from the offer.name field. This works in the same way
as voucher_code does in the same model.
I also found two issues with the voucher implementation within
the same model that are fixed now.
Fixes #330