Pārlūkot izejas kodu

Page Crédit : ajout du filtre id_user

refactoring
Guillaume Bourgeois pirms 5 gadiem
vecāks
revīzija
f83c0972a6
2 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. +6
    -0
      common/models/CreditHistorySearch.php
  2. +1
    -0
      producer/controllers/CreditController.php

+ 6
- 0
common/models/CreditHistorySearch.php Parādīt failu

@@ -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 Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt