diff --git a/backend/views/collection/index.php b/backend/views/collection/index.php
index e01f6de..b056d51 100644
--- a/backend/views/collection/index.php
+++ b/backend/views/collection/index.php
@@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\grid\GridView;
+use common\components\AccountTotalWidget;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\CollectionSearch */
@@ -15,6 +16,16 @@ $this->params['breadcrumbs'][] = $this->title;
= Html::encode($this->title) ?>
render('_search', ['model' => $searchModel]); ?>
+
+
+
+ $searchModel->totals
+ ])?>
+
+
+
= GridView::widget([
'dataProvider' => $dataProvider,
diff --git a/frontend/models/CollectionSearch.php b/frontend/models/CollectionSearch.php
index 13a19e6..7b604bc 100644
--- a/frontend/models/CollectionSearch.php
+++ b/frontend/models/CollectionSearch.php
@@ -29,7 +29,8 @@ class CollectionSearch extends Collection
return [
[[ 'start', ], 'date', 'format' =>Yii::$app->formatter->datetimeFormat , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd HH:mm' ,'timeZone' => 'UTC' ],
[[ 'end' , ], 'date' ,'format' =>Yii::$app->formatter->datetimeFormat , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd HH:mm' ,'timeZone' => 'UTC' ],
- ];
+ [['id_account'],'integer']
+];
}
/**
@@ -58,12 +59,15 @@ class CollectionSearch extends Collection
$this->load($params);
+ $this->id_user = Yii::$app->user->id;
+
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
+
$query->andFilterWhere([
'id_account' => $this->id_account,
]);