bd calendar and salary sum

This commit is contained in:
akosse
2020-01-17 16:28:25 +03:00
parent 88b0b13a2a
commit 188758c79c
15 changed files with 221 additions and 8 deletions

View File

@ -47,9 +47,21 @@ class UserCardController extends Controller
$searchModel = new UserCardSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$total = 0;
if(Yii::$app->request->queryParams)
foreach (Yii::$app->request->queryParams as $params)
$total = \common\models\UserCard::find()->filterWhere([
'fio' => $params['fio'],
'email' => $params['email'],
'status' => $params['status'],
'skills' => $params['skills'],
])->sum('salary');
else $total = \common\models\UserCard::find()->sum('salary');
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
'total' => $total,
]);
}