if (!$this->validate()) { | if (!$this->validate()) { | ||||
return $dataProvider; | return $dataProvider; | ||||
} | } | ||||
if(isset($this->id_user) && is_numeric($this->id_user)) { | |||||
$query->andWhere([ | |||||
'credit_history.id_user' => $this->id_user | |||||
]) ; | |||||
} | |||||
return $dataProvider; | return $dataProvider; | ||||
} | } |
public function actionHistory($returnPayment = '') | public function actionHistory($returnPayment = '') | ||||
{ | { | ||||
$searchModel = new CreditHistorySearch() ; | $searchModel = new CreditHistorySearch() ; | ||||
$searchModel->id_user = User::getCurrentId() ; | |||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams); | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | ||||
$userProducer = UserProducer::searchOne([ | $userProducer = UserProducer::searchOne([ |