]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавил фильтрацию по категориям 'букет', 'сборка', 'сервис'
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 29 May 2025 09:32:34 +0000 (12:32 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 29 May 2025 09:32:34 +0000 (12:32 +0300)
erp24/services/AutoPlannogrammaService.php

index 148980a2e881803c8b3317a22e1504e2c9669529..e54e3662a0027f6279d5c1c05b6d9a7dfb4bbfc3 100644 (file)
@@ -133,7 +133,7 @@ class AutoPlannogrammaService
                     ->leftJoin('products_1c_nomenclature p1c', "p1c.id = $productJoinCondition")
                     ->leftJoin('export_import_table ex', $storeJoinCondition)
                     ->andWhere(['ex.entity_id' => $storeIds])
-                    ->andWhere(['<>', 'p1c.category', ''])
+                    ->andWhere(['<>', 'p1c.category', ['', 'букет', 'сборка', 'сервис' ]])
                     ->andWhere(['>=', "$alias.date", (new \DateTime($month1 . '-01'))->format('Y-m-d')])
                     ->andWhere(['<=', "$alias.date", (new \DateTime($month3 . '-01'))->modify('last day of this month')->format('Y-m-d')])
                     ->groupBy(['ex.entity_id', 'p1c.category']),
@@ -149,7 +149,7 @@ class AutoPlannogrammaService
                     ->leftJoin('products_1c_nomenclature p1c', "p1c.id = $productJoinCondition")
                     ->leftJoin('export_import_table ex', $storeJoinCondition)
                     ->andWhere(['ex.entity_id' => $storeIds])
-                    ->andWhere(['<>', 'p1c.category', ''])
+                    ->andWhere(['<>', 'p1c.category', ['', 'букет', 'сборка', 'сервис' ]])
                     ->andWhere(['>=', "$alias.date", (new \DateTime($month1 . '-01'))->format('Y-m-d')])
                     ->andWhere(['<=', "$alias.date", (new \DateTime($month3 . '-01'))->modify('last day of this month')->format('Y-m-d')])
                     ->groupBy(['ex.entity_id']),
@@ -194,8 +194,6 @@ class AutoPlannogrammaService
             }
         }
 
-
-       // var_dump($allComponentsProductIds); die();
         $result = [];
         foreach ($rows as $r) {
             $sid = $r['store_id'];