Refs #145 -- Vouchers that grant discounts

This commit is contained in:
Raphael Michel
2016-11-29 15:04:49 +01:00
parent fdbe71ff63
commit eea6a5e9da
14 changed files with 234 additions and 74 deletions

View File

@@ -233,8 +233,7 @@ def _check_positions(event: Event, now_dt: datetime, positions: List[CartPositio
err = err or error_messages['voucher_expired']
cp.delete()
continue
if cp.voucher.price is not None:
price = cp.voucher.price
price = cp.voucher.calculate_price(price)
if price != cp.price and not (cp.item.free_price and cp.price > price):
positions[i] = cp