From: Alexander Smirnov Date: Wed, 26 Jun 2024 13:04:49 +0000 (+0300) Subject: [ERP-69] метод для сбора данных по отработанным сменам из нового факта fix X-Git-Tag: 1.3~42^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=5a863467a2fafb765a58315a42944eddf73bb93b;p=erp24_rep%2Fyii-erp24%2F.git [ERP-69] метод для сбора данных по отработанным сменам из нового факта fix --- diff --git a/erp24/records/TimetableFactModel.php b/erp24/records/TimetableFactModel.php index fa9dc159..48d33042 100644 --- a/erp24/records/TimetableFactModel.php +++ b/erp24/records/TimetableFactModel.php @@ -211,11 +211,9 @@ class TimetableFactModel extends ActiveRecord $timetableFactModels = TimetableFactModel::find()->where([ 'admin_id' => $admin_id, 'status' => AdminCheckin::TYPE_END, - 'date_start' => date('Y-m-d', strtotime($date_start)), - 'date_end' => date('Y-m-d', strtotime($date_end)) ]) - ->andWhere(['<=', 'date_start', date('Y-m-d', strtotime($date_start))]) - ->andWhere(['>=', 'date_end', date('Y-m-d', strtotime($date_end))]) + ->andWhere(['>=', 'date_start', date('Y-m-d', strtotime($date_start))]) + ->andWhere(['<=', 'date_end', date('Y-m-d', strtotime($date_end))]) ->all(); return $timetableFactModels; }