public function listadovendedorAction() { try { //Verifica el perfil del vendedor para seguir con esta opcoin $SesionUsuarioPlugin = $this->SesionUsuarioPlugin(); $SesionUsuarioPlugin->isLoginVentas(); //Establece la econexion $viewModel = new ViewModel(); $EntityManagerPlugin = $this->EntityManagerPlugin(); $PedidoBO = new PedidoBO(); $PedidoBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $accion = $this->params()->fromPost('accion', ''); $condiciones['cliente_nombre'] = $this->params()->fromPost('cliente_nombre', ''); $condiciones['fec_ingreso_ini'] = $this->params()->fromPost('fecha_ini', ''); $condiciones['fec_ingreso_fin'] = $this->params()->fromPost('fecha_fin', ''); $result = null; //Consultar if ($accion == 'C') { $result = $PedidoBO->listadoVendedor($condiciones); } //end if $viewModel->cliente_nombre = $condiciones['cliente_nombre']; $viewModel->fec_ingreso_ini = $condiciones['fec_ingreso_ini']; $viewModel->fec_ingreso_fin = $condiciones['fec_ingreso_fin']; $viewModel->desglosar_finca = $this->params()->fromPost('desglosar_finca', '0'); $viewModel->result = $result; $this->layout($SesionUsuarioPlugin->getUserLayout()); $viewModel->setTemplate('dispo/pedido/pedido_listado_vendedor.phtml'); return $viewModel; } catch (\Exception $e) { $excepcion_msg = utf8_encode($this->ExcepcionPlugin()->getMessageFormat($e)); $response = $this->getResponse(); $response->setStatusCode(500); $response->setContent($excepcion_msg); return $response; } }