fix reports
This commit is contained in:
parent
2f8e6466f4
commit
56ec8d8b13
@ -159,6 +159,7 @@ class ReportsController extends ApiController
|
|||||||
// return $reportsModel;
|
// return $reportsModel;
|
||||||
|
|
||||||
$reports = $reportsModel->reportsByDate();
|
$reports = $reportsModel->reportsByDate();
|
||||||
|
return $reports;
|
||||||
return ArrayHelper::toArray($reports , [
|
return ArrayHelper::toArray($reports , [
|
||||||
'common\models\Reports' => [
|
'common\models\Reports' => [
|
||||||
'date' => 'created_at',
|
'date' => 'created_at',
|
||||||
|
@ -71,8 +71,7 @@ class ReportSearchForm extends Model
|
|||||||
{
|
{
|
||||||
return Reports::find()->with('task')
|
return Reports::find()->with('task')
|
||||||
->where(['reports.user_card_id' => $this->user_card_id])
|
->where(['reports.user_card_id' => $this->user_card_id])
|
||||||
->where(['reports.user_card_id' => $this->user_card_id])
|
->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate])
|
||||||
->where(['between', 'reports.created_at', $this->fromDate, $this->toDate])
|
|
||||||
->asArray()->all();
|
->asArray()->all();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user