From: fomichev Date: Thu, 29 May 2025 09:32:34 +0000 (+0300) Subject: Добавил фильтрацию по категориям 'букет', 'сборка', 'сервис' X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f9022b96bad0550144990710a7da634ce55dcebd;p=erp24_rep%2Fyii-erp24%2F.git Добавил фильтрацию по категориям 'букет', 'сборка', 'сервис' --- diff --git a/erp24/services/AutoPlannogrammaService.php b/erp24/services/AutoPlannogrammaService.php index 148980a2..e54e3662 100644 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@ -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'];