Tokumeikoi 4 years ago
parent
commit
f667f5ee41
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Services/OrderService.php

+ 1 - 1
app/Services/OrderService.php

@@ -127,7 +127,7 @@ class OrderService
             ->where('status', 3);
         $surplusAmount = 0;
         foreach ($orderModel->get() as $item) {
-            $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at->format('U'));
+            $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->created_at->format('U'));
             if (!$surplusMonth) continue;
             $surplusMonth = ($surplusMonth - time()) / 2678400 / $strToMonth[$item->cycle];
             if ($surplusMonth > 0) {