public function nuevodataAction() { try { $SesionUsuarioPlugin = $this->SesionUsuarioPlugin(); $EntityManagerPlugin = $this->EntityManagerPlugin(); $ClienteBO = new ClienteBO(); $UsuarioBO = new UsuarioBO(); $PaisBO = new PaisBO(); $EstadosBO = new EstadosBO(); //$GrupoDispoCabBO = new GrupoDispoCabBO(); $ClienteBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $PaisBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $UsuarioBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $EstadosBO->setEntityManager($EntityManagerPlugin->getEntityManager()); //$GrupoDispoCabBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $respuesta = $SesionUsuarioPlugin->isLoginAdmin(); if ($respuesta == false) { return false; } $body = $this->getRequest()->getContent(); $json = json_decode($body, true); //$cliente_id = $json['cliente_id']; //$row = $ClienteBO->consultar($cliente_id, \Application\Constants\ResultType::MATRIZ); $response = new \stdClass(); $pais = null; $estados = null; $grupodispo = null; $usuario_vendedor_id = null; $response->cbo_tipo = $ClienteBO->getCombo("", " "); $response->cbo_pais_id = $PaisBO->getComboPais($pais, "<Seleccione>"); $response->cbo_usuario_vendedor_id = $UsuarioBO->getComboVendedoresAdmin($usuario_vendedor_id, "<Seleccione>"); $response->cbo_estado_id = $EstadosBO->getComboEstados($estados, "<Seleccione>"); //$response->cbo_grupo_dispo = $GrupoDispoCabBO->getComboGrupoDispo($grupodispo, "<Seleccione>"); $response->cbo_estado = \Application\Classes\ComboGeneral::getComboEstado("", ""); $response->cbo_formato_estado_cta = \Application\Classes\ComboGeneral::getComboFormatoEnvio("", ""); $response->respuesta_code = 'OK'; $response->respuesta_mensaje = ''; $json = new JsonModel(get_object_vars($response)); return $json; //false } catch (\Exception $e) { $excepcion_msg = utf8_encode($this->ExcepcionPlugin()->getMessageFormat($e)); $response = $this->getResponse(); $response->setStatusCode(500); $response->setContent($excepcion_msg); return $response; } }