$query->andWhere(['mth.matrix_type_id' => $matrixTypeId, 'mth.is_active' => BouquetCompositionMatrixTypeHistory::IS_ACTIVE]);
}
- $query->groupBy('bouquet_composition.id');
+ $query->groupBy('bouquet_composition.id')
+ ->orderBy('bouquet_composition.id desc');
$dataProvider = new \yii\data\ActiveDataProvider([
'query' => $query,
]);
}
- public function actionCreate() {
+ public function actionCreate()
+ {
$model = new BouquetComposition();
if (Yii::$app->request->isPost) {
$storesTypeList = BouquetForecast::getStoresList($id, BouquetForecast::OFFLINE_STORES, StoreType::class, [], $month, $year);
$marketplaceList = BouquetForecast::getStoresList($id, BouquetForecast::MARKETPLACE, CityStore::class, ['visible' => CityStore::IS_VISIBLE], $month, $year);
- $onlineStoresList = BouquetForecast::getStoresList($id, BouquetForecast::ONLINE_STORES, CityStore::class, ['visible' => CityStore::IS_VISIBLE], $month, $year);
+ $onlineStoresList = BouquetForecast::getStoresList($id, BouquetForecast::ONLINE_STORES, CityStore::class, ['visible' => CityStore::IS_VISIBLE], $month, $year);
return [
'success' => true,