]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-142] Теперь учитываются отпуска feature_smirnov_erp-142_personal_count
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 22 Aug 2024 11:54:09 +0000 (14:54 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 22 Aug 2024 11:54:09 +0000 (14:54 +0300)
erp24/services/MotivationService.php

index 77c925060a7257cd2ab08eb5559743ff22050442..ee005e07a25cc2e75eb3c793f8d23fcf2ccc2ffc 100644 (file)
@@ -690,7 +690,7 @@ class MotivationService
 
                 $norma = 15;
                 if ($timetableFactModel['admin_group_id'] != 45) {
-                    $timetablePlan = Timetable::find()->select(['COUNT(*) as total'])->where(['store_id' => $store_id, 'admin_id' => $admin_id, 'tabel' => 0])
+                    $timetablePlan = Timetable::find()->select(['COUNT(*) as total'])->where(['store_id' => $store_id, 'admin_id' => $admin_id, 'tabel' => 0, 'slot_type_id' => Timetable::TIMESLOT_WORK])
                         ->andWhere(['between', 'date', $monthStart, $monthEnd])->asArray()->one();
                     $norma = $timetablePlan['total'];
                 }