Esempio n. 1
0
 public function actionReports()
 {
     $workTypes = WorkType::getAllWorkTypes();
     $reportList = \Yii::$app->db->createCommand('SELECT SUM(sum) as sum, work_type FROM report GROUP BY work_type ORDER by id')->queryAll();
     return $this->render('reports', ['reportList' => $reportList, 'workTypes' => $workTypes]);
 }
Esempio n. 2
0
 public function actionViewAllInfoOfReport($id)
 {
     $workType = WorkType::getAllWorkTypes()[$id];
     $reportList = Report::find()->where(['work_type' => $id])->all();
     return $this->render('view-all-info-of-report', ['reportList' => $reportList, 'workType' => $workType]);
 }