From 083f66d183925bbbf4fa1e37ddaf234582149efe Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Wed, 10 Dec 2025 11:13:47 +0300 Subject: [PATCH] =?utf8?q?=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BD?= =?utf8?q?=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/api3/core/services/ReportService.php | 8 ++++---- erp24/records/Shift.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/erp24/api3/core/services/ReportService.php b/erp24/api3/core/services/ReportService.php index af90d302..2666e97d 100644 --- a/erp24/api3/core/services/ReportService.php +++ b/erp24/api3/core/services/ReportService.php @@ -486,7 +486,7 @@ class ReportService ], ]); } - if ($data->shift_type == 0) { + if ($data->shift_type == Shift::FULL_DAY_SHIFT) { $storeVisitorsQuery->andWhere([ 'or', [ @@ -1119,7 +1119,7 @@ class ReportService ], ]); } - if ($data->shift_type == 0) { + if ($data->shift_type == Shift::FULL_DAY_SHIFT) { $storeVisitorsQuery->andWhere([ 'or', [ @@ -1482,7 +1482,7 @@ class ReportService ->andWhere(['shift_id' => $shiftIds]); // Для типа смены 0 (обе смены) считаем каждую смену отдельно - if ($data->shift_type == 0) { + if ($data->shift_type == Shift::FULL_DAY_SHIFT) { // Для обеих смен нужны уникальные комбинации admin_id и shift_id $allAdminsInPeriod = $allAdminsInPeriodQuery ->select(['admin_id', 'shift_id']) @@ -1641,7 +1641,7 @@ class ReportService ], ]); } - if ($data->shift_type == 0) { + if ($data->shift_type == Shift::FULL_DAY_SHIFT) { $storeVisitorsQuery->andWhere([ 'or', [ diff --git a/erp24/records/Shift.php b/erp24/records/Shift.php index 991991a5..5d14c2fa 100755 --- a/erp24/records/Shift.php +++ b/erp24/records/Shift.php @@ -21,6 +21,7 @@ class Shift extends ActiveRecord { const DAY = 1; const NIGHT = 2; + const FULL_DAY_SHIFT = 0; const ADMINISTRATOR_8_17 = 5; const ADMINISTRATOR_9_18 = 8; -- 2.39.5