Exemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Documento::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 10]]);
     $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(['like', 'numeroDocumentoEmisor', $this->numeroDocumentoEmisor])->andFilterWhere(['like', 'serieNumero', $this->serieNumero])->andFilterWhere(['like', 'tipoDocumento', $this->tipoDocumento])->andFilterWhere(['like', 'tipoDocumentoEmisor', $this->tipoDocumentoEmisor])->andFilterWhere(['like', 'bl_cdr', $this->bl_cdr])->andFilterWhere(['like', 'bl_estadoProceso', $this->bl_estadoProceso])->andFilterWhere(['like', 'bl_estadoRegistro', $this->bl_estadoRegistro])->andFilterWhere(['like', 'codigoLeyenda_1', $this->codigoLeyenda_1])->andFilterWhere(['like', 'correoAdquiriente', $this->correoAdquiriente])->andFilterWhere(['like', 'correoEmisor', $this->correoEmisor])->andFilterWhere(['like', 'departamentoAdquiriente', $this->departamentoAdquiriente])->andFilterWhere(['like', 'departamentoEmisor', $this->departamentoEmisor])->andFilterWhere(['like', 'direccionEmisor', $this->direccionEmisor])->andFilterWhere(['like', 'distritoAdquiriente', $this->distritoAdquiriente])->andFilterWhere(['like', 'distritoEmisor', $this->distritoEmisor])->andFilterWhere(['like', 'distritoPtoLlegada', $this->distritoPtoLlegada])->andFilterWhere(['like', 'distritoPtoPartida', $this->distritoPtoPartida])->andFilterWhere(['like', 'fechaVencimiento', $this->fechaVencimiento])->andFilterWhere(['like', 'lugarDestino', $this->lugarDestino])->andFilterWhere(['like', 'nombreComercialEmisor', $this->nombreComercialEmisor])->andFilterWhere(['like', 'numeroDocumentoAdquiriente', $this->numeroDocumentoAdquiriente])->andFilterWhere(['like', 'paisEmisor', $this->paisEmisor])->andFilterWhere(['like', 'razonSocialAdquiriente', $this->razonSocialAdquiriente])->andFilterWhere(['like', 'razonSocialEmisor', $this->razonSocialEmisor])->andFilterWhere(['like', 'textoLeyenda_1', $this->textoLeyenda_1])->andFilterWhere(['like', 'tipoDocumentoAdquiriente', $this->tipoDocumentoAdquiriente])->andFilterWhere(['like', 'tipoMoneda', $this->tipoMoneda])->andFilterWhere(['like', 'totalDescuentos', $this->totalDescuentos])->andFilterWhere(['like', 'totalIgv', $this->totalIgv])->andFilterWhere(['like', 'totalValorVentaNetoOpExonerada', $this->totalValorVentaNetoOpExonerada])->andFilterWhere(['like', 'totalValorVentaNetoOpGratuitas', $this->totalValorVentaNetoOpGratuitas])->andFilterWhere(['like', 'totalValorVentaNetoOpGravadas', $this->totalValorVentaNetoOpGravadas])->andFilterWhere(['like', 'totalValorVentaNetoOpNoGravada', $this->totalValorVentaNetoOpNoGravada])->andFilterWhere(['like', 'totalVenta', $this->totalVenta])->andFilterWhere(['like', 'ubigeoEmisor', $this->ubigeoEmisor])->andFilterWhere(['like', 'urbanizacion', $this->urbanizacion])->andFilterWhere(['between', 'fechaEmision', $this->fechaEmisiondesde, $this->fechaEmisionhasta]);
     return $dataProvider;
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Documento::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' => $this->id, 'usuariocrea' => $this->usuariocrea, 'fechacrea' => $this->fechacrea, 'usuariomodifica' => $this->usuariomodifica, 'fechamodifica' => $this->fechamodifica]);
     $query->andFilterWhere(['like', 'documento', $this->documento]);
     return $dataProvider;
 }