Exemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = BaPengembalian::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['ID_Bab' => $this->ID_Bab, 'ID_PO' => $this->ID_PO, 'Tanggal_Surat' => $this->Tanggal_Surat, 'Tanggal_Terima' => $this->Tanggal_Terima, 'User_Id' => $this->User_Id]);
     $query->andFilterWhere(['like', 'No_Faktur', $this->No_Faktur])->andFilterWhere(['like', 'No_Surat_Jalan', $this->No_Surat_Jalan])->andFilterWhere(['like', 'Kondisi', $this->Kondisi]);
     return $dataProvider;
 }