From 6db5eaa85bbe9b41aa351e61d4696b4e6ab01f4b Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 19 Jun 2024 15:58:18 +0300 Subject: [PATCH] =?utf8?q?=D0=92=D0=B5=D1=80=D0=BD=D1=83=D0=BB=20=D1=83?= =?utf8?q?=D1=81=D0=BB=D0=BE=D0=B2=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=20?= =?utf8?q?=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=BE=D0=BC=20=D0=B2=20adminCheck?= =?utf8?q?in=20=D0=BF=D0=BE=D0=BF=D0=B0=D0=B4=D0=B0=D0=B5=D1=82=20plan=5Fi?= =?utf8?q?d=20=D0=BF=D0=BB=D0=B0=D0=BD=D0=B0=20=D0=B0=D0=B4=D0=BC=D0=B8?= =?utf8?q?=D0=BD=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/actions/timetable/StartShiftStepTwoAction.php | 6 +++++- erp24/views/timetable/_fact-table.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/erp24/actions/timetable/StartShiftStepTwoAction.php b/erp24/actions/timetable/StartShiftStepTwoAction.php index 49b12f1a..85d51a04 100755 --- a/erp24/actions/timetable/StartShiftStepTwoAction.php +++ b/erp24/actions/timetable/StartShiftStepTwoAction.php @@ -79,7 +79,11 @@ class StartShiftStepTwoAction extends Action /** @var TimetablePlan[] $planSlots */ $planSlots = TimetablePlan::find() - ->andFilterWhere(['store_id' => $model->store_id]) + ->andWhere( + ($device->isFixedStore() && !$userModel->adminGroup->isRoaming()) ? + ['store_id' => $model->store_id] : + ['admin_id' => $model->admin_id] + ) ->andWhere(['OR', ['BETWEEN', 'datetime_start', date('Y-m-d H:i:s'), date('Y-m-d H:i:s', strtotime('+6 hour'))], ['BETWEEN', 'datetime_end', date('Y-m-d H:i:s', strtotime('-6 hour')), date('Y-m-d H:i:s')], diff --git a/erp24/views/timetable/_fact-table.php b/erp24/views/timetable/_fact-table.php index a4d3e6a7..c03c30ae 100755 --- a/erp24/views/timetable/_fact-table.php +++ b/erp24/views/timetable/_fact-table.php @@ -42,7 +42,7 @@ $now = new \DateTime(); [ 'label' => 'сотрудник', 'content' => function (TimetablePlan $slot) { - return \yii_app\helpers\HtmlHelper::userPrint($slot->admin); + return $slot->admin ? \yii_app\helpers\HtmlHelper::userPrint($slot->admin) : '#' . $slot->admin_id; }, ], [ -- 2.39.5