public function pagosPorFecha2() { try { $inicio = isset($_POST['inicio']) ? $_POST['inicio'] : NULL; $fin = isset($_POST['fin']) ? $_POST['fin'] : NULL; $pago = new Pago(); $pagos = $pago->leerPagosPorRangoFecha($inicio, $fin); $pensiones = $pago->leerPensionesPorRangoFecha($inicio, $fin); $this->setVista('pagosDelDia'); $this->vista->set('pagos', $pagos); $this->vista->set('pensiones', $pensiones); return $this->vista->imprimir(); } catch (Exception $exc) { $this->setVista('mensaje'); $msj = "ERROR... La consulta no se pudo ejecutar.. !"; $this->vista->set('msj', $msj); return $this->vista->imprimir(); } }