]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-114] Сделать проставление стоимости смены у Администраторов в личном кабинете...
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 18 Jul 2024 07:26:25 +0000 (10:26 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 18 Jul 2024 07:26:25 +0000 (10:26 +0300)
erp24/services/CabinetService.php

index b8aa354ac08059b50c261605da67b8fb44c27ff1..8b30aa36562efeff58d31b2cf9dec6bc25671d62 100755 (executable)
@@ -2384,30 +2384,30 @@ class CabinetService
 
         $normalCountShiftArray = SalaryHelper::$normalCountShift;
         if (!empty($employeeSelect["group_id"])) {
-            if (Admin::ADMINISTRATOR_GROUP_ID == $employeeSelect["group_id"]){
-                if ($dateFrom >= '2023-12-01') {
-                    $dayMonthDateRow = $yearSelect . '-' . $monthSelect . '-01';
-                    $timeRow = strtotime($dayMonthDateRow);
-                    $monthSelectRow = date('n', $timeRow);
-                    $yearSelectRow = date('Y', $timeRow);
-                    if ($yearSelectRow == '2024' && $monthSelectRow == 1) {
-                        $normalCountShift = 20;
-                    } else {
-                        // у Администратора число смен равно количеству дней со вторника по субботу в месяце
-                        $normalCountShift = HtmlHelper::getAdministratorWorkDays($monthSelect, $yearSelect);
-                    }
-                } else {
-                    // у Администратора число смен равно количеству рабочих дней в месяце
-                    $normalCountShift = HtmlHelper::getWorkDays($monthSelect, $yearSelect);
-                }
-            } else {
+//            if (Admin::ADMINISTRATOR_GROUP_ID == $employeeSelect["group_id"]){
+//                if ($dateFrom >= '2023-12-01') {
+//                    $dayMonthDateRow = $yearSelect . '-' . $monthSelect . '-01';
+//                    $timeRow = strtotime($dayMonthDateRow);
+//                    $monthSelectRow = date('n', $timeRow);
+//                    $yearSelectRow = date('Y', $timeRow);
+//                    if ($yearSelectRow == '2024' && $monthSelectRow == 1) {
+//                        $normalCountShift = 20;
+//                    } else {
+//                        // у Администратора число смен равно количеству дней со вторника по субботу в месяце
+//                        $normalCountShift = HtmlHelper::getAdministratorWorkDays($monthSelect, $yearSelect);
+//                    }
+//                } else {
+//                    // у Администратора число смен равно количеству рабочих дней в месяце
+//                    $normalCountShift = HtmlHelper::getWorkDays($monthSelect, $yearSelect);
+//                }
+//            } else {
                 $employeeSelectGroupId = $this->getGroupId($employeeId, $employeeSelect['group_id'], $dateFrom, $dateTo);
                 if (array_key_exists($employeeSelectGroupId, $normalCountShiftArray)) {
                     $normalCountShift = $normalCountShiftArray[$employeeSelectGroupId];
                 } else {
                     $normalCountShift = 15;
                 }
-            }
+//            }
         }