137
->andWhere('begin_date >= :report_begin_date and
end_date <= :report_end_date')
->orderBy(['last_name' => SORT_ASC, 'first_name' =>
SORT_ASC, 'middle_name' => SORT_ASC])
->params ([':report_begin_date' => Yii::$app->user-
>identity->report_begin_date, ':report_end_date' => Yii::$app->user->identity-
>report_end_date])
->all();
return Yii::$app->response->sendContentAsFile($this-
>renderPartial('report-t7', ['vacations' => $vacations]), Yii::t('app', 'Report T7') . '.xls');
}
public function actionReportT13()
{
$workers = \app\models\Worker::find()
->andWhere(['active' => true])
->orderBy(['last_name' => SORT_ASC, 'first_name' =>
SORT_ASC, 'middle_name' => SORT_ASC])
->all();
return Yii::$app->response->sendContentAsFile($this-
>renderPartial('report-t13', ['workers' => $workers, 'settings' => Yii::$app->user-
>identity]), Yii::t('app', 'Report T13') . '.xls');
}