From: Alexander Smirnov Date: Thu, 22 Aug 2024 11:54:09 +0000 (+0300) Subject: [ERP-142] Теперь учитываются отпуска X-Git-Tag: 1.4~27^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=2c013edae9d3bf65e74ec9ef63ba76d6b8edaa02;p=erp24_rep%2Fyii-erp24%2F.git [ERP-142] Теперь учитываются отпуска --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index 77c92506..ee005e07 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -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']; }