From 1bb9051d0014d09e042b7cb5f223fa69a29d8762 Mon Sep 17 00:00:00 2001 From: fomichev Date: Wed, 16 Apr 2025 13:55:53 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2=20?= =?utf8?q?=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80?= =?utf8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/BouquetController.php | 6 ++-- erp24/views/bouquet/month-goal.php | 38 +++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 5 deletions(-) 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' => '', +// ], ]) ?> -- 2.39.5