From c648308634215f15cec0a742a1fa8963181127da Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Wed, 20 May 2020 11:56:56 +0800 Subject: [PATCH] update telegram --- app/Services/OrderService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 7e4cac1d..b7a784ea 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -128,6 +128,7 @@ class OrderService $surplusAmount = 0; foreach ($orderModel->get() as $item) { $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at->format('U')); + if (!$surplusMonth) continue; $surplusMonth = ($surplusMonth - time()) / 2678400 / $strToMonth[$item->cycle]; if ($surplusMonth > 0) { $surplusAmount = $surplusAmount + ($item['total_amount'] + $item['balance_amount']) * $surplusMonth;