From 233ecec1357bab52ca17971678da5dbb42d70923 Mon Sep 17 00:00:00 2001 From: marina Date: Fri, 29 Nov 2024 19:03:50 +0300 Subject: [PATCH] =?utf8?q?ERP-243=20=D0=94=D0=B5=D0=B9=D1=81=D1=82=D0=B2?= =?utf8?q?=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD?= =?utf8?q?=D0=B5=20(II=20=D1=8D=D1=82=D0=B0=D0=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/views/shift-transfer/_transfer.php | 28 +++++++++++------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/erp24/views/shift-transfer/_transfer.php b/erp24/views/shift-transfer/_transfer.php index 61b2b7ee..65bddbca 100644 --- a/erp24/views/shift-transfer/_transfer.php +++ b/erp24/views/shift-transfer/_transfer.php @@ -3,36 +3,34 @@ use yii\helpers\ArrayHelper; use yii_app\records\Products1c; use yii_app\records\ProductsClass; +use yii_app\records\ShiftTransfer; -?> - new \yii\data\ArrayDataProvider([ 'allModels' => $shiftTransfer->shiftRemains ]), // 'showFooter' => true, 'columns' => [ - [ - 'attribute' => 'group_label', - 'label' => 'Название группы', -// 'footer' => 'Итого:', - 'pageSummary' => 'Итого:', - 'value' => function($data) { - return ProductsClass::getHints()[$data['group_label']] ?? ''; - }, - ], [ 'attribute' => 'product_guid', 'label' => 'Продукт', + 'pageSummary' => 'Итого:', 'value' => function($data) { - $productsClass = ProductsClass::find()->select('category_id') - ->where(['tip' => $data['group_label'] ?? null])->column(); - $products = ArrayHelper::map(Products1c::find()->select(['id', 'name']) - ->where(['parent_id' => $productsClass])->all(), 'id', 'name'); + ->where(['id' => $data['product_guid']])->all(), 'id', 'name'); return $products[$data['product_guid']] ?? ''; }, ], + [ + 'attribute' => 'group_label', + 'label' => 'Название группы', + 'value' => function($data) { + return ProductsClass::getHints()[$data['group_label']] ?? ''; + }, + ], [ 'attribute' => 'retail_price', 'label' => 'Розничная цена, руб', -- 2.39.5