<?php namespace myretail\models;use yii\base\Model;use yii\data\ActiveDataProvider;use myretail\models\SyncToJurnal;class SyncToJurnalSearch extends SyncToJurnal{public function rules(){return [ [['last_update','tipe_tabel','status_sinkron','keterangan','tipe_proses'],'safe'],[['id','id_record'],'integer'],[['id_jurnal'],'number'],];}public function scenarios(){return Model::scenarios();}public function search($params){$query=SyncToJurnal::find()->where(['type_con'=>'retail']);$dataProvider=new ActiveDataProvider([ 'query'=>$query,]);$this->load($params);if(!$this->validate()){return $dataProvider;}$query->andFilterWhere([ 'last_update'=>$this->last_update,'id'=>$this->id,'id_record'=>$this->id_record,'id_jurnal'=>$this->id_jurnal,]);$query->andFilterWhere(['like','tipe_tabel',$this->tipe_tabel])->andFilterWhere(['!=','tipe_tabel','rst_fc_payment'])->andFilterWhere(['like','status_sinkron',$this->status_sinkron])->andFilterWhere(['like','keterangan',$this->keterangan])->andFilterWhere(['like','tipe_proses',$this->tipe_proses]);return $dataProvider;}}