]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-302 Редактирование букета
authormarina <m.zozirova@gmail.com>
Thu, 20 Feb 2025 12:49:05 +0000 (15:49 +0300)
committermarina <m.zozirova@gmail.com>
Thu, 20 Feb 2025 12:49:05 +0000 (15:49 +0300)
erp24/controllers/BouquetController.php

index 33694ed8d36d30b5ee1552d18b5f46e29b8e7c6a..0351a290b763403c3813fa0fe8cce80f0d7493e2 100644 (file)
@@ -51,7 +51,8 @@ class BouquetController extends Controller
             $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,
@@ -64,7 +65,8 @@ class BouquetController extends Controller
         ]);
     }
 
-    public function actionCreate() {
+    public function actionCreate()
+    {
         $model = new BouquetComposition();
 
         if (Yii::$app->request->isPost) {
@@ -373,7 +375,7 @@ class BouquetController extends Controller
 
         $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,