models/FleteSearch.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 = Flete::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'ID' => $this->ID,
            'ESTATUS_FLETE_ID' => $this->ESTATUS_FLETE_ID,
            'EMPRESACHOFER_ID' => $this->EMPRESACHOFER_ID,
            'VEHICULO_ID' => $this->VEHICULO_ID,
            'LISTA_ID' => $this->LISTA_ID,
            'GUIA_SADA' => $this->GUIA_SADA,
            'FE_EMISION_GS' => $this->FE_EMISION_GS,
            'DIAS_VENCE_GS' => $this->DIAS_VENCE_GS,
            'FE_VENCE_GS' => $this->FE_VENCE_GS,
            'ORDEN_PESO_CARGA' => $this->ORDEN_PESO_CARGA,
            'FE_EMISION_OPC' => $this->FE_EMISION_OPC,
            'ORDEN_CARGA_CVA' => $this->ORDEN_CARGA_CVA,
            'FE_EMISION_OCCVA' => $this->FE_EMISION_OCCVA,
            'ORDEN_CARGA_TQ' => $this->ORDEN_CARGA_TQ,
            'FE_EMISION_OCTQ' => $this->FE_EMISION_OCTQ,
            'FE_IN_BOL' => $this->FE_IN_BOL,
            'FE_PE_TARA_BOL' => $this->FE_PE_TARA_BOL,
            'PESO_TARA_BOL' => $this->PESO_TARA_BOL,
            'FE_PE_CAR_BOL' => $this->FE_PE_CAR_BOL,
            'PESO_CAR_BOL' => $this->PESO_CAR_BOL,
            'FE_OUT_BOL' => $this->FE_OUT_BOL,
            'FE_IN_CEN' => $this->FE_IN_CEN,
            'FE_PE_CAR_CEN' => $this->FE_PE_CAR_CEN,
            'PESO_CAR_CEN' => $this->PESO_CAR_CEN,
            'FE_PE_TARA_CEN' => $this->FE_PE_TARA_CEN,
            'PE_TARA_CEN' => $this->PE_TARA_CEN,
            'PESO_CARGA' => $this->PESO_CARGA,
            'PESO_DESCARGA' => $this->PESO_DESCARGA,
            'FALTANTE' => $this->FALTANTE,
            'GUIA_RECEP' => $this->GUIA_RECEP,
        ]);
        $query->andFilterWhere(['like', 'OBSERVACIONES', $this->OBSERVACIONES]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Flete :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'ID' => $ this -> ID , 'ESTATUS_FLETE_ID' => $ this -> ESTATUS_FLETE_ID , 'EMPRESACHOFER_ID' => $ this -> EMPRESACHOFER_ID , 'VEHICULO_ID' => $ this -> VEHICULO_ID , 'LISTA_ID' => $ this -> LISTA_ID , 'GUIA_SADA' => $ this -> GUIA_SADA , 'FE_EMISION_GS' => $ this -> FE_EMISION_GS , 'DIAS_VENCE_GS' => $ this -> DIAS_VENCE_GS , 'FE_VENCE_GS' => $ this -> FE_VENCE_GS , 'ORDEN_PESO_CARGA' => $ this -> ORDEN_PESO_CARGA , 'FE_EMISION_OPC' => $ this -> FE_EMISION_OPC , 'ORDEN_CARGA_CVA' => $ this -> ORDEN_CARGA_CVA , 'FE_EMISION_OCCVA' => $ this -> FE_EMISION_OCCVA , 'ORDEN_CARGA_TQ' => $ this -> ORDEN_CARGA_TQ , 'FE_EMISION_OCTQ' => $ this -> FE_EMISION_OCTQ , 'FE_IN_BOL' => $ this -> FE_IN_BOL , 'FE_PE_TARA_BOL' => $ this -> FE_PE_TARA_BOL , 'PESO_TARA_BOL' => $ this -> PESO_TARA_BOL , 'FE_PE_CAR_BOL' => $ this -> FE_PE_CAR_BOL , 'PESO_CAR_BOL' => $ this -> PESO_CAR_BOL , 'FE_OUT_BOL' => $ this -> FE_OUT_BOL , 'FE_IN_CEN' => $ this -> FE_IN_CEN , 'FE_PE_CAR_CEN' => $ this -> FE_PE_CAR_CEN , 'PESO_CAR_CEN' => $ this -> PESO_CAR_CEN , 'FE_PE_TARA_CEN' => $ this -> FE_PE_TARA_CEN , 'PE_TARA_CEN' => $ this -> PE_TARA_CEN , 'PESO_CARGA' => $ this -> PESO_CARGA , 'PESO_DESCARGA' => $ this -> PESO_DESCARGA , 'FALTANTE' => $ this -> FALTANTE , 'GUIA_RECEP' => $ this -> GUIA_RECEP , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'OBSERVACIONES' , $ this -> OBSERVACIONES ] ) ; 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