shish пре 2 година
родитељ
комит
ee9b52aca8
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      app-ghs/controllers/OrderController.php

+ 3 - 2
app-ghs/controllers/OrderController.php

@@ -2084,7 +2084,8 @@ class OrderController extends BaseController
         $period = dateUtil::formatTime($searchTime, $startTime, $endTime, true);
         $start = $period['startTime'];
         $end = $period['endTime'];
-        $ghsList = GhsClass::getAllByCondition(['ownShopId' => $this->shopId], null, 'id,name', 'id');
+
+        $customList = CustomClass::getAllByCondition(['ownMainId' => $this->mainId], null, 'id,name', 'id');
         $currentStartDate = date('Y-m-d', strtotime($start));
         $currentEndDate = date('Y-m-d', strtotime($end));
         $currentStartTime = $currentStartDate . ' 00:00:00';
@@ -2106,7 +2107,7 @@ class OrderController extends BaseController
                     $list[$customId]['amount'] = bcadd($list[$customId]['amount'], $actPrice, 2);
                     $list[$customId]['num'] = bcadd($list[$customId]['num'], 1);
                 } else {
-                    $name = $ghsList[$customId] && $ghsList[$customId]['name'] ? $ghsList[$customId]['name'] : '未命名';
+                    $name = $customList[$customId] && $customList[$customId]['name'] ? $customList[$customId]['name'] : '未命名';
                     $list[$customId] = ['id' => $customId, 'name' => $name, 'amount' => $actPrice, 'num' => 1];
                 }
                 $totalAmount = bcadd($totalAmount, $actPrice, 2);