$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_product' => $this->id_product, 'id_product_type' => $this->id_product_type, 'id_account' => $this->id_account, 'purchase_price' => $this->purchase_price, 'sale_price' => $this->sale_price, 'profit_margins' => $this->profit_margins, 'status' => $this->status, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]); $query->andFilterWhere(['like', 'product_number', $this->product_number]) ->andFilterWhere(['like', 'barcode', $this->barcode]) ->andFilterWhere(['like', 'description', $this->description]); return $dataProvider; } }