->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']),
->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']),
}
}
-
- // var_dump($allComponentsProductIds); die();
$result = [];
foreach ($rows as $r) {
$sid = $r['store_id'];