Beispiel #1
0
 public function excel($params)
 {
     $query = Pago::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => array('pageSize' => 10000)]);
     $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, 'forma_pago_id' => $this->forma_pago_id, 'rce_examen_id' => $this->rce_examen_id, 'monto' => $this->monto, 'comprobante' => $this->comprobante, 'estadopago' => $this->estadopago]);
     return $dataProvider;
 }
Beispiel #2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Pago::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, 'fecha_registro' => $this->fecha_registro, 'fecha_pago' => $this->fecha_pago, 'medio' => $this->medio, 'valor' => $this->valor, 'estado' => $this->estado, 'academia' => $this->academia]);
     $query->andFilterWhere(['like', 'info', $this->info])->andFilterWhere(['like', 'comprobante', $this->comprobante]);
     return $dataProvider;
 }
Beispiel #3
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(PagoUpdateRequest $request, $id)
 {
     $pago = Pago::find($id);
     $pago->fill($request->all());
     $pago->save();
     Session::flash('mensaje', 'Pago modificado correctamente');
     return redirect('pagos');
 }
Beispiel #4
0
 public function esValido()
 {
     $socio = Socio::find(Input::get('socios_id'));
     $plan = Plan::find(Input::get('planes_id'));
     $pagos = Pago::find();
 }