From: Aleksey Filippov Date: Tue, 14 May 2024 09:38:19 +0000 (+0300) Subject: правка по изменению статуса заявки X-Git-Tag: 1.1~31^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=bb2cbb59731eb16aa01d2401ae90617c78f38308;p=erp24_rep%2Fyii-erp24%2F.git правка по изменению статуса заявки --- diff --git a/erp24/api3/core/services/ClaimService.php b/erp24/api3/core/services/ClaimService.php index 4727721e..150ada58 100644 --- a/erp24/api3/core/services/ClaimService.php +++ b/erp24/api3/core/services/ClaimService.php @@ -100,6 +100,10 @@ class ClaimService extends Model $admin->save(false); }; } + + $model->status = $row->action === 'accept' ? EmployeeOnShift::STATUS_ACCEPT : EmployeeOnShift::STATUS_REJECT; + $model->save(); + if ($row->action == 'accept') { $timetable = new Timetable; $timetable->admin_group_id = $admin->group_id; @@ -126,8 +130,6 @@ class ClaimService extends Model throw new InvalidArgumentException("не получилось создать расписание"); } } - $model->status = $row->action === 'accept' ? EmployeeOnShift::STATUS_ACCEPT : EmployeeOnShift::STATUS_REJECT; - $model->save(); return true; } diff --git a/erp24/scripts/tasks/task_22_create_employee_for_1c_with_admins_with_empty_guid.php b/erp24/scripts/tasks/task_22_create_employee_for_1c_with_admins_with_empty_guid.php index 1ad061f7..ef1f90f4 100644 --- a/erp24/scripts/tasks/task_22_create_employee_for_1c_with_admins_with_empty_guid.php +++ b/erp24/scripts/tasks/task_22_create_employee_for_1c_with_admins_with_empty_guid.php @@ -34,7 +34,7 @@ $result = 0; $enable = true; $start = false; -$force = false; +$force = true; $minuetTimeInTask = date('i', $time); $fullTimeInTask = date('Y-m-d H:i:s', $time);