models/DistribucionSearch.php
/**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
Creates data provider instance with search query applied
@param array $params


Creates data provider instance with search query applied @param array $params
public function search($params)
    {
        $query = Distribucion::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->joinWith('cENTRALES');
        $query->andFilterWhere([
            'ID' => $this->ID,
            'CARGA_ID' => $this->CARGA_ID,
            'CANTIDAD' => $this->CANTIDAD,
            'FE_ASIGNACION' => $this->FE_ASIGNACION,
            'CANT_FLETES' => $this->CANT_FLETES,
            'FE_EMISION_PI' => $this->FE_EMISION_PI,
            'DIAS_VENCE_PI' => $this->DIAS_VENCE_PI,
            'FE_VENCE_PI' => $this->FE_VENCE_PI,
            'CODIGO_SICA' => $this->CODIGO_SICA,
            'CANT_DESPACHADA' => $this->CANT_DESPACHADA,
            'FE_REGISTRO' => $this->FE_REGISTRO,
            'ESTATUS_DIS' => $this->ESTATUS_DIS,
        ]);
        $query->andFilterWhere(['like', 'PERMISO_INSAI', $this->PERMISO_INSAI])
            ->andFilterWhere(['like', 'OBSERVACIONES', $this->OBSERVACIONES])
            ->andFilterWhere(['like', 'DESCRIPCION', $this->DESCRIPCION])
            ->andFilterWhere(['like', 'cENTRALES.NOMBRE', $this->CENTRALES_ID]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Distribucion :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> joinWith ( 'cENTRALES' ) ; $ query -> andFilterWhere ( [ 'ID' => $ this -> ID , 'CARGA_ID' => $ this -> CARGA_ID , 'CANTIDAD' => $ this -> CANTIDAD , 'FE_ASIGNACION' => $ this -> FE_ASIGNACION , 'CANT_FLETES' => $ this -> CANT_FLETES , 'FE_EMISION_PI' => $ this -> FE_EMISION_PI , 'DIAS_VENCE_PI' => $ this -> DIAS_VENCE_PI , 'FE_VENCE_PI' => $ this -> FE_VENCE_PI , 'CODIGO_SICA' => $ this -> CODIGO_SICA , 'CANT_DESPACHADA' => $ this -> CANT_DESPACHADA , 'FE_REGISTRO' => $ this -> FE_REGISTRO , 'ESTATUS_DIS' => $ this -> ESTATUS_DIS , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'PERMISO_INSAI' , $ this -> PERMISO_INSAI ] ) -> andFilterWhere ( [ 'like' , 'OBSERVACIONES' , $ this -> OBSERVACIONES ] ) -> andFilterWhere ( [ 'like' , 'DESCRIPCION' , $ this -> DESCRIPCION ] ) -> andFilterWhere ( [ 'like' , 'cENTRALES.NOMBRE' , $ this -> CENTRALES_ID ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
// add conditions that should always apply here // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); // grid filtering conditions