mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -116,13 +116,14 @@ class OrderController extends Controller | |||||||
|         if (isset($coupon)) { |         if (isset($coupon)) { | ||||||
|             switch ($coupon->type) { |             switch ($coupon->type) { | ||||||
|                 case 1: $order->discount_amount = $order->total_amount - $coupon->value; |                 case 1: $order->discount_amount = $order->total_amount - $coupon->value; | ||||||
|  |                     break; | ||||||
|                 case 2: $order->discount_amount = $order->total_amount * ($coupon->value / 100); |                 case 2: $order->discount_amount = $order->total_amount * ($coupon->value / 100); | ||||||
|  |                     break; | ||||||
|             } |             } | ||||||
|             $order->total_amount = $order->total_amount - $order->discount_amount; |             $order->total_amount = $order->total_amount - $order->discount_amount; | ||||||
|         } |         } | ||||||
|         // free process |         // free process | ||||||
|         if ($order->total_amount <= 0) { |         if ($order->total_amount <= 0) { | ||||||
|             $order->total_amount = 0; |  | ||||||
|             $order->status = 1; |             $order->status = 1; | ||||||
|         } |         } | ||||||
|         if (!$order->save()) { |         if (!$order->save()) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user