mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	update: fix coupon use
This commit is contained in:
		| @@ -30,6 +30,9 @@ class CouponService | ||||
|                 $order->discount_amount = $order->total_amount * ($this->coupon->value / 100); | ||||
|                 break; | ||||
|         } | ||||
|         if ($order->discount_amount > $order->total_amount) { | ||||
|             $order->discount_amount = $order->total_amount; | ||||
|         } | ||||
|         if ($this->coupon->limit_use !== NULL) { | ||||
|             $this->coupon->limit_use = $this->coupon->limit_use - 1; | ||||
|             if (!$this->coupon->save()) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user