From c0399b30b0f0fb8bb3782c6a80702cb2370200c1 Mon Sep 17 00:00:00 2001 From: iIronside Date: Thu, 19 Jan 2023 16:45:21 +0300 Subject: [PATCH] fix reports --- frontend/modules/api/models/ReportSearchForm.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/modules/api/models/ReportSearchForm.php b/frontend/modules/api/models/ReportSearchForm.php index 10be209..ba74955 100755 --- a/frontend/modules/api/models/ReportSearchForm.php +++ b/frontend/modules/api/models/ReportSearchForm.php @@ -62,8 +62,7 @@ class ReportSearchForm extends Model { return Reports::find()->with('task') ->where(['reports.user_card_id' => $this->user_card_id]) -// ->where(['between', 'reports.created_at', $this->fromDate, $this->toDate]) - ->andWhere(['reports.created_at' => $this->date]) + ->andWhere(['reports.created_at', 'reports.created_at', $this->fromDate, $this->toDate]) ->asArray()->all(); } @@ -71,7 +70,7 @@ class ReportSearchForm extends Model { return Reports::find()->with('task') ->where(['reports.user_card_id' => $this->user_card_id]) - ->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate]) + ->andWhere(['reports.created_at' => $this->date]) ->asArray()->all(); } } \ No newline at end of file