From: marina Date: Fri, 29 Nov 2024 16:03:50 +0000 (+0300) Subject: ERP-243 Действия по замене (II этап) X-Git-Tag: 1.7~216^2~7 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=233ecec1357bab52ca17971678da5dbb42d70923;p=erp24_rep%2Fyii-erp24%2F.git ERP-243 Действия по замене (II этап) --- 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' => 'Розничная цена, руб',