mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	order process fix
This commit is contained in:
		| @@ -128,11 +128,15 @@ class OrderService | |||||||
|             ->where('status', 3); |             ->where('status', 3); | ||||||
|  |  | ||||||
|         $totalValue = $orderModel->sum('total_amount') + $orderModel->sum('balance_amount'); |         $totalValue = $orderModel->sum('total_amount') + $orderModel->sum('balance_amount'); | ||||||
|  |         $totalValue = 0; | ||||||
|         $totalMonth = 0; |         $totalMonth = 0; | ||||||
|         foreach ($orderModel->get() as $item) { |         foreach ($orderModel->get() as $item) { | ||||||
|             $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at); |             $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item['updated_at']); | ||||||
|             $surplusMonth = ($surplusMonth - time()) / 2678400; |             $surplusMonth = ($surplusMonth - time()) / 2678400; | ||||||
|             $totalMonth = $totalMonth + $surplusMonth; |             if ($surplusMonth) { | ||||||
|  |                 $totalMonth = $totalMonth + $surplusMonth; | ||||||
|  |                 $totalValue = ($item['total_amount'] + $item['balance_amount']) * $surplusMonth; | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|         if (!$totalValue || !$totalMonth) { |         if (!$totalValue || !$totalMonth) { | ||||||
|             return; |             return; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user