shish hace 2 años
padre
commit
78df9f210e
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      app-ghs/controllers/OrderController.php

+ 9 - 1
app-ghs/controllers/OrderController.php

@@ -2091,7 +2091,7 @@ class OrderController extends BaseController
         $currentStartTime = $currentStartDate . ' 00:00:00';
         $currentEndTime = $currentEndDate . ' 23:59:59';
 
-        $where = ['mainId' => $mainId, 'status' => 4];
+        $where = ['mainId' => $mainId];
         if ($debt > -1) {
             $where['debt'] = $debt;
         }
@@ -2103,6 +2103,14 @@ class OrderController extends BaseController
             foreach ($orderList as $orderInfo) {
                 $actPrice = $orderInfo['actPrice'] ?? 0;
                 $customId = $orderInfo['customId'] ?? 0;
+                $status = $orderInfo['status'] ?? 0;
+                $book = $orderInfo['book'] ?? 0;
+                if ($status == 1 || $status == 5) {
+                    continue;
+                }
+                if ($book == 1 && $status == 2) {
+                    continue;
+                }
                 if (isset($list[$customId])) {
                     $list[$customId]['amount'] = bcadd($list[$customId]['amount'], $actPrice, 2);
                     $list[$customId]['num'] = bcadd($list[$customId]['num'], 1);