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