->leftJoin('sales_products p', 'p.check_id = s.id')
->where(['between', 's.date', $date_start, $date_end])
->andWhere(['order_id' => ['', '0']])
- ->andWhere(['operation' => Sales::OPERATION_SALE])
->andWhere(['p.product_id' => array_keys($products1c)])
->groupBy(['s.store_id', 's.admin_id'])
->asArray()->all();
]) ->leftJoin('sales_products p', 'p.check_id = s.id')
->where(['between', 's.date', $date_start, $date_end])
->andWhere(['order_id' => ['', '0']])
- ->andWhere(['operation' => Sales::OPERATION_SALE])
->andWhere(['p.product_id' => array_keys($products1c)])
->andWhere(['store_id' => $data->stores])
->groupBy(['store_id'])