From c90ba5e779952db747669c369f767d63955b3e9d Mon Sep 17 00:00:00 2001 From: marina Date: Thu, 8 Aug 2024 22:50:12 +0300 Subject: [PATCH] =?utf8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=B7?= =?utf8?q?=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F=20=D1=81=D0=BC=D0=B5?= =?utf8?q?=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/forms/timetable/StartForm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erp24/forms/timetable/StartForm.php b/erp24/forms/timetable/StartForm.php index b7ad9178..e9580dca 100755 --- a/erp24/forms/timetable/StartForm.php +++ b/erp24/forms/timetable/StartForm.php @@ -167,20 +167,20 @@ class StartForm extends Model if (!$plan) { $this->addError('plan_id', 'Неправильный номер записи плана'); } - if (!$plan->isWorkSlot()) { + if (isset($plan) && !$plan->isWorkSlot()) { $this->addError('plan_id', 'Нерабочий день по плану'); } - if ($this->date != $plan->date) { + if (isset($plan) && $this->date != $plan->date) { $this->addError('date', 'Дата открытия не совпадает с планом'); } $targetAdminId = $this->admin_id ?: $this->replaced_admin_id; - if ($targetAdminId != $plan->admin_id) { + if (isset($plan) && $targetAdminId != $plan->admin_id) { $this->addError($this->replaced_admin_id ? 'replaced_admin_id' : 'admin_id', 'Выбран неправильный пользователь в плане'); } - if ($this->d_id != $plan->d_id) { + if (isset($plan) && $this->d_id != $plan->d_id) { $this->addError('d_id', 'Выбранная должность не совпадает с планом'); } - if ($this->date != $plan->date) { + if (isset($plan) && $this->date != $plan->date) { $this->addError('date', 'Дата не совпадает с планом'); } }], -- 2.39.5