From 24bdd707e21cec2a3aecf29d408df43d395bd979 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 19 Dec 2024 10:39:25 +0300 Subject: [PATCH] =?utf8?q?[ERP-261]=20=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC?= =?utf8?q?=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D1=8B=20=D0=B7=D0=B0=D0=B3?= =?utf8?q?=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/views/waybill-incoming/index.php | 80 +++++++++++++++++++++----- erp24/views/waybill-incoming/view.php | 37 +++++++++--- 2 files changed, 95 insertions(+), 22 deletions(-) diff --git a/erp24/views/waybill-incoming/index.php b/erp24/views/waybill-incoming/index.php index c3b1fee0..cca65c6c 100644 --- a/erp24/views/waybill-incoming/index.php +++ b/erp24/views/waybill-incoming/index.php @@ -15,7 +15,7 @@ use yii_app\records\WaybillIncoming;
-

Waybill Income

+

Список накладных оприходования

$dataProvider, @@ -23,15 +23,35 @@ use yii_app\records\WaybillIncoming; ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'guid', + 'label' => 'GUID документа для 1С', 'value' => function ($model) { return \yii\helpers\Html::a($model->guid, ['view', 'id' => $model->id]); }, 'format' => 'raw', ], - 'shift_transfer_id', - 'status', - 'created_admin_id', - 'updated_admin_id', + [ + 'attribute' => 'shift_transfer_id', + 'label' => 'Накладная передачи', + 'format' => 'html', + 'value' => function ($model) { + return Html::a($model['shift_transfer_id'], ['/shift-transfer/view', 'id' => $model['shift_transfer_id']], ['class' => 'btn btn-link']); + } + ], + [ + 'attribute' => 'status', + 'label' => 'Статус', + 'value' => function ($model) { + return \yii_app\records\WriteOffsErp::STATUSES[$model->status]; + } + ], + [ + 'attribute' => 'created_admin_id', + 'label' => 'Создано Кем' + ], + [ + 'attribute' => 'updated_admin_id', + 'label' => 'Обновлено Кем' + ], [ 'label' => 'Магазин', 'attribute' => 'store_id', @@ -40,16 +60,46 @@ use yii_app\records\WaybillIncoming; ->entity_id)->name; } ], - 'number', - 'number_1c', - 'date', - 'comment', - 'quantity', - 'summ', - 'summ_self_cost', - 'created_at', - 'updated_at', - 'send_at', + [ + 'attribute' => 'number', + 'label' => 'Название документа' + ], + [ + 'attribute' => 'number_1c', + 'label' => 'Название документа в 1С' + ], + [ + 'attribute' => 'date', + 'label' => 'Дата Документа' + ], + [ + 'attribute' => 'comment', + 'label' => 'Комментарий' + ], + [ + 'attribute' => 'quantity', + 'label' => 'Количество' + ], + [ + 'attribute' => 'summ', + 'label' => 'Сумма розницы' + ], + [ + 'attribute' => 'summ_self_cost', + 'label' => 'Сумма себестоимости' + ], + [ + 'attribute' => 'created_at', + 'label' => 'Создано в' + ], + [ + 'attribute' => 'updated_at', + 'label' => 'Обновлено в' + ], + [ + 'attribute' => 'send_at', + 'label' => 'Отправлено в' + ], [ 'class' => ActionColumn::class, 'template' => '{view}', diff --git a/erp24/views/waybill-incoming/view.php b/erp24/views/waybill-incoming/view.php index 996d8504..75f18a75 100644 --- a/erp24/views/waybill-incoming/view.php +++ b/erp24/views/waybill-incoming/view.php @@ -16,6 +16,7 @@ $this->params['breadcrumbs'][] = $this->title; ?>
+ 'btn btn-secondary btn-sm'])?>

title) ?>

@@ -23,16 +24,26 @@ $this->params['breadcrumbs'][] = $this->title; 'model' => $model, 'attributes' => [ 'id', - 'guid', + [ + 'attribute' => 'guid', + 'label' => 'GUID документа для 1С' + ], [ 'attribute' => 'shift_transfer_id', 'format' => 'html', + 'label' => 'Накладная передачи', 'value' => function ($model) { return Html::a($model['shift_transfer_id'], ['/shift-transfer/view', 'id' => $model['shift_transfer_id']], ['class' => 'btn btn-link']); } ], - 'number', - 'date', + [ + 'attribute' => 'number', + 'label' => 'Название документа', + ], + [ + 'attribute' => 'date', + 'label' => 'Дата документа', + ], [ 'label' => 'Магазин', 'attribute' => 'store_id', @@ -41,9 +52,21 @@ $this->params['breadcrumbs'][] = $this->title; ->entity_id)->name; } ], - 'quantity', - 'summ_self_cost', - 'status', + [ + 'attribute' => 'quantity', + 'label' => 'Количество', + ], + [ + 'attribute' => 'summ_self_cost', + 'label' => 'Сумма себестоимости', + ], + [ + 'attribute' => 'status', + 'label' => 'Статус', + 'value' => function ($model) { + return \yii_app\records\WriteOffsErp::STATUSES[$model->status]; + } + ], [ 'label' => 'Создан пользователем', 'attribute' => 'created_admin_id', @@ -74,4 +97,4 @@ $this->params['breadcrumbs'][] = $this->title; ], ]) ?> -
\ No newline at end of file +
-- 2.39.5