瀏覽代碼

fix: order surplus issue

Tokumeikoi 4 年之前
父節點
當前提交
644aedb999
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      app/Services/OrderService.php

+ 1 - 4
app/Services/OrderService.php

@@ -136,10 +136,7 @@ class OrderService
         foreach ($orders as $k => $item) {
             // 兼容历史余留问题
             if ($item->cycle === 'onetime_price') continue;
-            if ($this->orderIsUsed($item)) {
-                unset($orders[$k]);
-                continue;
-            }
+            if ($this->orderIsUsed($item)) continue;
             $orderSurplusMonth = $orderSurplusMonth + self::STRTOTIME[$item->cycle];
             $orderSurplusAmount = $orderSurplusAmount + ($item['total_amount'] + $item['balance_amount']);
         }