From: Alexander Smirnov Date: Fri, 6 Dec 2024 08:13:14 +0000 (+0300) Subject: [ERP-258] перестановка колонок X-Git-Tag: 1.7~189^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=c293be1e154540afed5337461c7ecb1d721e6756;p=erp24_rep%2Fyii-erp24%2F.git [ERP-258] перестановка колонок --- diff --git a/erp24/views/shift-transfer/_transfer.php b/erp24/views/shift-transfer/_transfer.php index c40a94da..d0a3e9a2 100644 --- a/erp24/views/shift-transfer/_transfer.php +++ b/erp24/views/shift-transfer/_transfer.php @@ -28,46 +28,21 @@ echo \kartik\grid\GridView::widget([ $products = ArrayHelper::map(Products1c::find()->select(['id', 'name']) ->where(['id' => $data['product_guid']])->all(), 'id', 'name'); - return $products[$data['product_guid']] ?? ''; + return ($products[$data['product_guid']] ?? '') . ' (' . ($data['retail_price'] ?? '') . ' руб.)'; }, ], -// [ -// 'attribute' => 'group_label', -// 'label' => 'Название группы', -// 'value' => function($data) { -// return ProductsClass::getHints()[$data['group_label']] ?? ''; -// }, -// ], [ - 'attribute' => 'retail_price', - 'label' => 'Розничная цена, руб', - 'value' => function($data) { - return $data['retail_price'] ?? ''; - }, - ], - [ - 'attribute' => 'self_cost', - 'label' => 'Себестоимость, руб', -// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'self_cost')), - 'pageSummary' => true, - 'value' => function($data) { - return $data['self_cost'] ?? ''; - }, - ], - [ - 'attribute' => 'remains_summ', - 'label' => 'Сумма остатков (недостача или излишек), руб', + 'attribute' => 'remains_1c', + 'label' => 'Остатки по 1с, шт', 'pageSummary' => true, -// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_summ')), 'value' => function($data) { - return $data['remains_summ'] ?? ''; + return $data['remains_1c'] ?? ''; }, ], [ 'attribute' => 'remains_count', 'label' => 'Фактические остатки кол-во, шт', 'pageSummary' => true, -// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_count')), 'value' => function($data) { return $data['remains_count'] ?? ''; }, @@ -76,26 +51,26 @@ echo \kartik\grid\GridView::widget([ 'attribute' => 'fact_and_1c_diff', 'label' => 'Разница факт и по программе 1с, шт', 'pageSummary' => true, -// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'fact_and_1c_diff')), 'value' => function($data) { return $data['fact_and_1c_diff'] ?? ''; }, ], [ - 'attribute' => 'remains_1c', - 'label' => 'Остатки по 1с, шт', + 'attribute' => 'remains_summ', + 'label' => 'Сумма остатков (недостача или излишек), руб', 'pageSummary' => true, -// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_1c')), 'value' => function($data) { - return $data['remains_1c'] ?? ''; + return $data['remains_summ'] ?? ''; + }, + ], + [ + 'attribute' => 'self_cost', + 'label' => 'Себестоимость, руб', + 'pageSummary' => true, + 'value' => function($data) { + return $data['self_cost'] ?? ''; }, ], -// [ -// 'attribute' => 'type', -// 'value' => function ($model) { -// return $model->type === \yii_app\records\ShiftRemains::ARCHIVE_RECORD ? 'Архивная запись' : 'Временная запись'; -// } -// ], ], 'layout' => '{items}', 'showPageSummary' => true,