Ver código fonte

Page Crédit : ajout du filtre id_user

dev
Guillaume Bourgeois 5 anos atrás
pai
commit
f83c0972a6
2 arquivos alterados com 7 adições e 0 exclusões
  1. +6
    -0
      common/models/CreditHistorySearch.php
  2. +1
    -0
      producer/controllers/CreditController.php

+ 6
- 0
common/models/CreditHistorySearch.php Ver arquivo

@@ -76,6 +76,12 @@ class CreditHistorySearch extends CreditHistory
if (!$this->validate()) {
return $dataProvider;
}
if(isset($this->id_user) && is_numeric($this->id_user)) {
$query->andWhere([
'credit_history.id_user' => $this->id_user
]) ;
}

return $dataProvider;
}

+ 1
- 0
producer/controllers/CreditController.php Ver arquivo

@@ -70,6 +70,7 @@ class CreditController extends ProducerBaseController
public function actionHistory($returnPayment = '')
{
$searchModel = new CreditHistorySearch() ;
$searchModel->id_user = User::getCurrentId() ;
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$userProducer = UserProducer::searchOne([

Carregando…
Cancelar
Salvar