// Actualiza el campo de observaciones $Csv = new C_SV(); $Csv->Load_Solicitud_tramite($idTramite); $tramite->Load_Tramite($idTramite); $iniciador = $tramite->Get_dato("t_iniciador"); $agencia = $tramite->Get_dato("t_dueno"); $usuarioAgencia = new Usuario(); $usuarioAgencia->Load_Usuario_By_ID($agencia); // Se envia el mensaje a las 3 partes de la transaccion $mensaje = sprintf("La solicitud <strong>%05s</strong> ha sido <strong>COMPRADA</strong> por <strong>(AGENCIA) %s</strong>.", $idTramite, $usuarioAgencia->Get_dato('nombre')); $tramite->EnviaNotificacion($idTramite, $mensaje, $agencia, $agencia); $tramite->EnviaNotificacion($idTramite, $mensaje, $agencia, $iniciador); } $empleado = new Empleado(); $empleado->Load_datos_por_usuario2($iniciador); $iniciador = $empleado->Get_dato("jefe"); //Se modifica la etapa $aprobador = $_POST['iniciador']; $ruta_autorizadores = ""; if ($exedeParametrosDeTolerancia == true) { $tramite->Modifica_Etapa($t_id, SOLICITUD_ETAPA_APROBACION, FLUJO_SOLICITUD, $iniciador, $ruta_autorizadores); } else { $tramite->Modifica_Etapa($t_id, SOLICITUD_ETAPA_COMPRADA, FLUJO_SOLICITUD, $aprobador, $ruta_autorizadores); } //header("Location: ./index.php?id=".$t_id); if ($mobile) { header("Location: " . $RUTA_R . "inicial.php?action=comprar"); } else { // Regresa a la pagina de solicitudes header("Location: ./index.php?action=comprar"); }
//"0" para no enviar email y "1" para enviarlo //Notificacion al gerente de area //obtenemos el id del usuario al que pertenece ese Director de area $query = sprintf("SELECT sv_ceco_paga FROM solicitud_viaje WHERE sv_tramite=%s", $tramiteId); $rst = $cnn->consultar($query); while ($fila = mysql_fetch_assoc($rst)) { $sv_ceco_paga = $fila['sv_ceco_paga']; } $queryResp = sprintf("SELECT cc_responsable FROM cat_cecos WHERE cc_id=%s", $sv_ceco_paga); $rstResp = $cnn->consultar($queryResp); while ($fila = mysql_fetch_assoc($rstResp)) { $cc_responsable = $fila['cc_responsable']; } $GerenteArea = new Empleado(); $GerenteArea->Load_id_empleado($cc_responsable); $destinatario = $GerenteArea->Get_dato('idempleado'); //construimos la segunda ruta de autorizacion $rutaAutorizacion = new RutaAutorizacion(); $aprobadornuevo = $rutaAutorizacion->generaRutaSegundaAutorizacion($destinatario, $tramiteId); $tramite->Modifica_Etapa($tramiteId, SOLICITUD_ETAPA_SEGUNDA_APROBACION, FLUJO_SOLICITUD, $aprobadornuevo, ""); $usuarioCreador = new Usuario(); $usuarioCreador->Load_Usuario_By_ID($tramite->Get_dato("t_iniciador")); $mensaje = sprintf("El monto que la agencia de viajes ha registrado para la compra del boleto de avión de la solicitud de viaje <strong>%05s</strong> creada por:<strong>%s</strong> excede el límite de tolerancia y requiere de tu autorización.", $tramiteId, $usuarioCreador->Get_dato('nombre')); $remitente = $tramite->Get_dato("t_dueno"); //se le enviara al Gerente de area $tramite->EnviaNotificacion($tramiteId, $mensaje, $remitente, $destinatario, "0", ""); //"0" para no enviar email y "1" para enviarlo //queda pendiente las notificaciones de la segunda ruta. } //funcion que nos regresara el numero de CECO al cual esta asignado el usuario ( creacion de una solicitud viaje) if (isset($_POST['idEmpleado'])) {
public function identificarBando($idUsuario) { $empleado = new Empleado(); $empleado->cargaEmpleadoporIdusuario($idUsuario); return $empleado->Get_dato("b_id"); }
<tr> <th width="5%" align="center" valign="middle">No.</th> <th width="30%" align="center" valign="middle">Nombre</th> <th width="30%" align="center" valign="middle">Puesto</th> <th width="30%" align="center" valign="middle">Empresa</th> <th width="30%" align="center" valign="middle">Tipo</th> <th width="5%" align="center" valign="middle">Eliminar</th> </tr> </thead> <tbody> <tr><?php // Obtener el puesto del empleado $idempleado = $_SESSION["idusuario"]; $usuarioEmpleado = new Empleado(); $usuarioEmpleado->cargaDatosEmpleadoUsuario($idempleado); $nombreUsuario = $usuarioEmpleado->Get_dato('nombre'); $empresaId = $usuarioEmpleado->Get_dato('u_empresa'); $puesto = $usuarioEmpleado->Get_dato('npuesto'); $interno = $usuarioEmpleado->Get_dato('u_interno'); $interno = $interno ? "Interno" : ""; // Obtener el nombre de la empresa $datosEmpresa = new Empresa(); $datosEmpresa->Load_Empresa($empresaId); $nombreEmpresa = $datosEmpresa->Get_Dato('e_nombre'); ?> <td><div id='renglon1'>1</div><input type="hidden" name="row1" id="row1" value="1" readonly='readonly'/></td> <td><?php echo $nombreUsuario; ?> <input type="hidden" name="nombre1" id="nombre1" value="<?php echo $nombreUsuario;