From: marina Date: Mon, 2 Dec 2024 13:46:09 +0000 (+0300) Subject: ERP-243 Действия по замене (II этап) X-Git-Tag: 1.7~210^2~2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7bc0c7bcfd1335bc72b1ef82c76fd56ef5b9c968;p=erp24_rep%2Fyii-erp24%2F.git ERP-243 Действия по замене (II этап) --- diff --git a/erp24/controllers/ShiftTransferController.php b/erp24/controllers/ShiftTransferController.php index 4641a943..fd0db98c 100644 --- a/erp24/controllers/ShiftTransferController.php +++ b/erp24/controllers/ShiftTransferController.php @@ -153,6 +153,7 @@ class ShiftTransferController extends Controller $action = Yii::$app->request->post('action'); $model = ShiftTransfer::findOne($id); if ($action === 'accept') { + $model->updateAttributes(['date_end' => date('Y-m-d H:i:s')]); $model->updateAttributes(['status_id' => ShiftTransfer::STATUS_ID_ACCEPTED]); ShiftRemains::updateAll(['type' => ShiftRemains::ARCHIVE_RECORD], ['shift_transfer_id' => $id]); } elseif ($action === 'save') { diff --git a/erp24/views/shift-transfer/_replacement.php b/erp24/views/shift-transfer/_replacement.php index 834ae51f..b26b6841 100644 --- a/erp24/views/shift-transfer/_replacement.php +++ b/erp24/views/shift-transfer/_replacement.php @@ -153,7 +153,7 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO ]), 'columns' => [ [ - 'attribute' => 'product_replacement_id', + 'attribute' => 'product_id', 'label' => 'Товар замена', 'value' => function ($model) { return $model->productReplacement->name;