From 813fbfde331a1017292186b300a7933f31159dcc Mon Sep 17 00:00:00 2001 From: fomichev Date: Tue, 10 Dec 2024 17:46:21 +0300 Subject: [PATCH] =?utf8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=82=D0=B0?= =?utf8?q?=D0=B1=D0=BB=D0=B8=D1=86=D1=8B=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA?= =?utf8?q?=D0=B0=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=BE?= =?utf8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../WaybillWriteOffsController.php | 29 +++++++++ erp24/views/waybill-write-offs/index.php | 62 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 erp24/controllers/WaybillWriteOffsController.php create mode 100644 erp24/views/waybill-write-offs/index.php diff --git a/erp24/controllers/WaybillWriteOffsController.php b/erp24/controllers/WaybillWriteOffsController.php new file mode 100644 index 00000000..3ce886d8 --- /dev/null +++ b/erp24/controllers/WaybillWriteOffsController.php @@ -0,0 +1,29 @@ + WaybillWriteOffs::find()->where(['active' => 1]), // Отображаем только активные записи + 'pagination' => [ + 'pageSize' => 20, // Количество записей на странице + ], + ]); + + return $this->render('index', [ + 'dataProvider' => $dataProvider, + ]); + } + + public function actionView() + { + return $this->render('view'); + } + +} diff --git a/erp24/views/waybill-write-offs/index.php b/erp24/views/waybill-write-offs/index.php new file mode 100644 index 00000000..6252b1a1 --- /dev/null +++ b/erp24/views/waybill-write-offs/index.php @@ -0,0 +1,62 @@ +title = 'Список накладных списания'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + + + $dataProvider, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + [ + 'attribute' => 'guid', + 'value' => function ($model) { + return \yii\helpers\Html::a($model->guid, ['view', 'id' => $model->id]); + }, + 'format' => 'raw', + ], + 'shift_transfer_id', + 'number', + 'date', + [ + 'label' => 'Магазин', + 'attribute' => 'store_id', + 'value' => function ($model) { + return CityStore::findOne(\yii_app\records\ExportImportTable::findOne(['export_val' => $model->store_guid])->entity_id)->name; + } + ], + 'quantity', + 'summ', + 'summ_self_cost', + + 'created_at', + 'send_at', + [ + 'label' => 'Создан пользователем', + 'attribute' => 'created_admin_id', + 'value' => function ($model) { + return Admin::findOne( [$model->created_admin_id])->name; + } + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view} ', + ], + ], + ]); ?> + +
\ No newline at end of file -- 2.39.5