add collections to backend
This commit is contained in:
@@ -68,13 +68,16 @@ class TransferSearch extends Transfer
|
||||
'query' => $query,
|
||||
]);
|
||||
|
||||
|
||||
|
||||
$this->load($params);
|
||||
|
||||
|
||||
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->where('0=1');
|
||||
}
|
||||
$query->andWhere(['id_user' => Yii::$app->user->id ] );
|
||||
|
||||
$query->andFilterWhere([
|
||||
'id_account' => $this->id_account,
|
||||
@@ -98,11 +101,6 @@ class TransferSearch extends Transfer
|
||||
'money' => 0
|
||||
];
|
||||
|
||||
// if ( $this->hasErrors() ){
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
$accounts = Account::find()->orderBy("name asc")->all();
|
||||
$accountMap = ArrayHelper::map( $accounts ,'id_account','name' );
|
||||
@@ -110,11 +108,6 @@ class TransferSearch extends Transfer
|
||||
|
||||
$this->totals = Transfer::mkTotals($this->timestampStart, $this->timestampEnd, $idUser, $this->types, $this->id_account, $accounts, $accountMap);
|
||||
|
||||
// $this->totalsCreatedAt = $totals['created_at'];
|
||||
// $this->totalsPaidAt = $totals['paid_at'];
|
||||
// $this->totalsCreatedAtPaid = $totals['created_at_paid'];
|
||||
// $this->totalsCreatedAtNotPaid = $totals['created_at_not_paid'];
|
||||
// $this->totalsPaidAtNotCreatedAt = $totals['paid_at_not_created_at'];
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user