From 3dd6e358838b80edf29efa5f0b33e8269af4c09f Mon Sep 17 00:00:00 2001 From: marina Date: Fri, 13 Dec 2024 11:07:36 +0300 Subject: [PATCH] =?utf8?q?ERP-259=20=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?utf8?q?=D1=82=D0=BA=D0=B0=20=D0=B2=D1=82=D0=BE=D1=80=D0=BE=D0=B3=D0=BE?= =?utf8?q?=20=D1=88=D0=B0=D0=B3=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4?= =?utf8?q?=D0=B0=D1=87=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/views/shift-transfer/_replacement.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/erp24/views/shift-transfer/_replacement.php b/erp24/views/shift-transfer/_replacement.php index a67e51d2..152c7665 100644 --- a/erp24/views/shift-transfer/_replacement.php +++ b/erp24/views/shift-transfer/_replacement.php @@ -35,9 +35,7 @@ $form = \yii\widgets\ActiveForm::begin(); ?> //echo Html::a('Справочник замен', Url::to(['/crud/product1c-replacement/index'])); -if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIONS, ShiftTransfer::STATUS_ID_INPUT_FACT_REMAINS]) - && Yii::$app->user->id === $shiftTransfer->end_shift_admin_id) { - +if (\yii_app\records\Admin::findOne(Yii::$app->user->id)->group_id == \yii_app\records\AdminGroup::GROUP_IT) { echo Html::submitButton('Пересчитать таблицу замен', [ 'class' => 'btn btn-primary float-right', 'name' => 'action', @@ -268,11 +266,17 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO [ 'label' => 'Цена товара', 'attribute' => 'product_price', + 'value' => function($data) { + return number_format($data['product_price'] ?? '', 2, '.', ' '); + }, ], [ 'label' => 'Сумма', 'attribute' => 'summ', 'pageSummary' => true, + 'value' => function($data) { + return number_format($data['summ'] ?? '', 2, '.', ' '); + }, 'footer' => Html::tag('b', 'Недостача: ') . '  ' . Html::tag('b', number_format($writeOffsBalance, 2, '.', ' ')), ], ], @@ -307,11 +311,17 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO [ 'label' => 'Цена товара', 'attribute' => 'product_price', + 'value' => function($data) { + return number_format($data['product_price'] ?? '', 2, '.', ' '); + }, ], [ 'label' => 'Сумма', 'attribute' => 'summ', 'pageSummary' => true, + 'value' => function($data) { + return number_format($data['summ'] ?? '', 2, '.', ' '); + }, 'footer' => Html::tag('b', 'Излишек: ') . '  ' . Html::tag('b', number_format($incomingBalance, 2, '.', ' ')), ], ], -- 2.39.5