From: Vladimir Fomichev Date: Mon, 17 Nov 2025 14:12:33 +0000 (+0300) Subject: добавление алиаса X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b91ac4857b81833d4ebb805a9738f483f49df290;p=erp24_rep%2Fyii-erp24%2F.git добавление алиаса --- diff --git a/erp24/api3/core/services/ReportService.php b/erp24/api3/core/services/ReportService.php index dea5f2da..42b96d22 100644 --- a/erp24/api3/core/services/ReportService.php +++ b/erp24/api3/core/services/ReportService.php @@ -339,7 +339,7 @@ class ReportService ->andWhere(['>=', 'date', date("Y-m-01", strtotime($data->date_start))]) ->andWhere(['<=', 'date', $data->date_end]) ->andWhere(['tabel' => 0, 'slot_type_id' => Timetable::TIMESLOT_WORK]) - ->andWhere(['active' => 1]) + ->andWhere(['t.active' => 1]) ->asArray()->all(); $adminIdsInPeriod = ArrayHelper::getColumn($allAdminsInPeriod, 'admin_id'); @@ -359,7 +359,7 @@ class ReportService ->andWhere(['>=', 'date', date("Y-m-01", strtotime($currentDate))]) ->andWhere(['<=', 'date', $currentDate]) ->andWhere(['shift_id' => $shift_id, 'tabel' => 0, 'slot_type_id' => Timetable::TIMESLOT_WORK]) - ->andWhere(['active' => 1]) + ->andWhere(['t.active' => 1]) ->asArray()->all(); $timetables = Timetable::find()->alias('t')->select(['admin_id', 'a.name as adminName', 't.store_id', 't.shift_id']) @@ -367,7 +367,7 @@ class ReportService ->where(['t.store_id' => $data->stores]) ->andWhere(['date' => $currentDate, 'tabel' => 0]) ->andWhere(['shift_id' => $shift_id, 'slot_type_id' => Timetable::TIMESLOT_WORK]) - ->andWhere(['active' => 1]) + ->andWhere(['t.active' => 1]) ->asArray()->all(); $adminIdsMonth = ArrayHelper::getColumn($timetablesMonth, 'admin_id');