public function consultarcabeceraAction() { try { $SesionUsuarioPlugin = $this->SesionUsuarioPlugin(); $EntityManagerPlugin = $this->EntityManagerPlugin(); $GrupoPrecioCabBO = new GrupoPrecioCabBO(); $GrupoPrecioCabBO->setEntityManager($EntityManagerPlugin->getEntityManager()); $respuesta = $SesionUsuarioPlugin->isLoginAdmin(); if ($respuesta == false) { return false; } $body = $this->getRequest()->getContent(); $json = json_decode($body, true); $grupo_precio_cab_id = $json['grupo_precio_cab_id']; $row = $GrupoPrecioCabBO->consultarCabecera($grupo_precio_cab_id, \Application\Constants\ResultType::MATRIZ); $response = new \stdClass(); $response->row = $row; $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; } }