mirror of
https://github.com/v2board/v2board.git
synced 2025-02-04 12:39:12 +08:00
update: fix coupon
This commit is contained in:
parent
ef96fca97b
commit
9250d7b19c
@ -38,8 +38,8 @@ class CouponService
|
|||||||
$order->discount_amount = $order->total_amount;
|
$order->discount_amount = $order->total_amount;
|
||||||
}
|
}
|
||||||
if ($this->coupon->limit_use !== NULL) {
|
if ($this->coupon->limit_use !== NULL) {
|
||||||
$this->coupon->limit_use = $this->coupon->limit_use - 1;
|
|
||||||
if ($this->coupon->limit_use <= 0) return false;
|
if ($this->coupon->limit_use <= 0) return false;
|
||||||
|
$this->coupon->limit_use = $this->coupon->limit_use - 1;
|
||||||
if (!$this->coupon->save()) {
|
if (!$this->coupon->save()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user