From: fomichev Date: Wed, 16 Apr 2025 10:55:53 +0000 (+0300) Subject: Правки в контроллере X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=1bb9051d0014d09e042b7cb5f223fa69a29d8762;p=erp24_rep%2Fyii-erp24%2F.git Правки в контроллере --- diff --git a/erp24/controllers/BouquetController.php b/erp24/controllers/BouquetController.php index 73e366ea..314a9720 100644 --- a/erp24/controllers/BouquetController.php +++ b/erp24/controllers/BouquetController.php @@ -257,9 +257,9 @@ class BouquetController extends Controller public function actionMonthGoal() { $request = Yii::$app->request; - - $month = $request->post('month', 5); - $year = $request->post('year', 2025); + $post = $request->post(); + $month = $post['DynamicModel']['month'] ?? 5; + $year = $post['DynamicModel']['year'] ?? 2025; $model = DynamicModel::validateData( ['month' => $month, 'year' => $year], diff --git a/erp24/views/bouquet/month-goal.php b/erp24/views/bouquet/month-goal.php index 88913afb..b030367c 100644 --- a/erp24/views/bouquet/month-goal.php +++ b/erp24/views/bouquet/month-goal.php @@ -25,7 +25,7 @@ $saleTypesLabels = [
Url::to(['your-controller/month-goal']), + 'action' => Url::to(['bouquet/month-goal']), 'method' => 'post', ]); ?> @@ -114,7 +114,8 @@ $saleTypesLabels = [ 'columns' => [ ['attribute' => 'product_guid', 'value' => function ($model, $key, $index, $widget) { - return \yii_app\records\Products1c::find()->where(['id' => $model['product_guid']])->one()->name; + return \yii_app\records\Products1c::find()->where(['id' => $model['product_guid']])->one()->name . + " (" . $model['product_guid'] . ")"; }, 'label' => 'Product GUID'], ['attribute' => 'bouquet_id', @@ -128,6 +129,39 @@ $saleTypesLabels = [ ['attribute' => 'raw_calculation', 'label' => 'Базовый расчёт'], ['attribute' => 'rounded', 'label' => 'С наценкой за сборку'], ], +// 'export' => [ +// 'fontAwesome' => true +// ], +// 'exportConfig' => [ +// 'html' => [], +// 'csv' => [ +// 'label' => Yii::t('kvgrid', 'CSV'), +// 'icon' => '', +// 'iconOptions' => ['class' => 'text-primary'], +// 'showHeader' => true, +// 'showPageSummary' => true, +// 'showFooter' => true, +// 'showCaption' => true, +// 'filename' => Yii::t('kvgrid', 'grid-export'), +// 'alertMsg' => Yii::t('kvgrid', 'The CSV export file will be generated for download.'), +// 'options' => ['title' => Yii::t('kvgrid', 'Comma Separated Values')], +// 'mime' => 'application/csv', +// 'config' => [ +// 'colDelimiter' => ",", +// 'rowDelimiter' => "\r\n", +// ], +// ], +// 'txt' => [], +// 'xls' => [], +// 'pdf' => [], +// 'json' => [], +// ], +// 'panel' => [ +// 'after' => '', +// 'heading' => Html::encode($storesMap[$storeId] ?? $storeId) , +// 'type' => 'primary', +// 'before' => '', +// ], ]) ?>