Kaynağa Gözat

采购统计优化

shish 2 yıl önce
ebeveyn
işleme
b5f76352e5
1 değiştirilmiş dosya ile 11 ekleme ve 7 silme
  1. 11 7
      app-ghs/controllers/StatCgGhsController.php

+ 11 - 7
app-ghs/controllers/StatCgGhsController.php

@@ -15,7 +15,8 @@ class StatCgGhsController extends BaseController
 {
 
     //采购列表 ssh 20211017
-    public function actionProfile(){
+    public function actionProfile()
+    {
         $get = Yii::$app->request->get();
         $mainId = $this->mainId;
         $export = $get['export'] ?? 0;
@@ -58,6 +59,9 @@ class StatCgGhsController extends BaseController
                 if ($status != 4) {
                     continue;
                 }
+                if ($actPrice <= 0) {
+                    continue;
+                }
                 $carton = 0;
                 $pack = 0;
                 $freight = 0;
@@ -140,13 +144,13 @@ class StatCgGhsController extends BaseController
             util::stop();
         }
         util::success([
-            'list' => $list, 
-            'totalActPrice' => $totalActPrice, 
-            'totalOrderPrice' => $totalOrderPrice, 
-            'totalCarton' => $totalCarton, 
+            'list' => $list,
+            'totalActPrice' => $totalActPrice,
+            'totalOrderPrice' => $totalOrderPrice,
+            'totalCarton' => $totalCarton,
             'totalNum' => $totalNum,
-            'totalPack' => $totalPack, 
-            'totalFreight' => $totalFreight, 
+            'totalPack' => $totalPack,
+            'totalFreight' => $totalFreight,
             'totalTkPrice' => $totalTkPrice
         ]);
         //[['amount','ghsId','ghsName','num','py']]