Bladeren bron

Page Crédit : ajout du filtre id_user

dev
Guillaume Bourgeois 5 jaren geleden
bovenliggende
commit
f83c0972a6
2 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. +6
    -0
      common/models/CreditHistorySearch.php
  2. +1
    -0
      producer/controllers/CreditController.php

+ 6
- 0
common/models/CreditHistorySearch.php Bestand weergeven

@@ -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 Bestand weergeven

@@ -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([

Laden…
Annuleren
Opslaan