$tramite->Modifica_Etapa($t_id, SOLICITUD_ETAPA_COTIZADA, FLUJO_SOLICITUD, $destinatario, ""); } } else { if ($CotizacionAuto >= $cotAuto && $CotizacionHotel >= $cotHotel) { $mensaje = sprintf("La solicitud de viaje <strong>%05s</strong> ha sido cotizada por <strong>Agencia</strong>.", $t_id); $tramite->Modifica_Etapa($t_id, SOLICITUD_ETAPA_COTIZADA, FLUJO_SOLICITUD, $destinatario, ""); } else { $mensaje = sprintf("La solicitud de viaje <strong>%05s</strong> no ha terminado de ser cotizada por la <strong>Agencia</strong>.", $t_id); $tramite->Modifica_Etapa($t_id, SOLICITUD_ETAPA_EN_COTIZACION, FLUJO_SOLICITUD, $destinatario, ""); } } //------------------------------------------------ } elseif ($texto == "" && $CotizacionAvion == 0 || $texto != "" && $CotizacionAvion == 0) { //Terrestre ó Aereo $banderaTTransporte = 0; $banderaTTransporte = $tramite->solViajeTransporte($t_id); if ($banderaTTransporte == 0) { //Viaje totalmente terrestre //se validara que las cotizaciones que pidio, siendo un viaje terrestre, a la agencia se haya realizado $cotAuto = 0; $cotHotel = 0; error_log("Viaje terrestre"); $queryVerificaCotizacion = "SELECT svi_hotel_agencia, svi_renta_auto_agencia FROM sv_itinerario svi\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tINNER JOIN solicitud_viaje sv\n\t\t\t\t\t\t\t\tON sv.sv_id = svi.svi_solicitud\n\t\t\t\t\t\t\t\tINNER JOIN tramites tr\n\t\t\t\t\t\t\t\tON tr.t_id = sv.sv_tramite\n\t\t\t\t\t\t\t\tWHERE t_id ={$t_id}"; $rstVerificaCotizaciones = $cnn->consultar($queryVerificaCotizacion); //obtenemos la cotizacion realizada a agencia while ($fila = mysql_fetch_array($rstVerificaCotizaciones)) { if ($fila['svi_hotel_agencia'] == 1) { $cotHotel++; } if ($fila['svi_renta_auto_agencia'] == 1) { $cotAuto++;
</div> <?php } else { if ($tipoUsuario == 4 && $verBotonCotizaBoletoAvion) { ?> <div align="center"> <!-- value="Cotización de boleto de avión" --> <input type="button" id="cotizaAvion" name="cotizaAvion" value="Cotización de boleto de avión" onclick="editaItinerario();"/> </div> <?php } } ?> <?php $tramite = new Tramite(); $medioViaje = $tramite->solViajeTransporte($_GET['id']); $sql = "SELECT svi_hotel_agencia, svi_renta_auto_agencia\n\t\t\t\tFROM solicitud_viaje\n\t\t\t\tLEFT JOIN sv_itinerario ON svi_solicitud = sv_id\n\t\t\t\tWHERE svi_tipo_transporte = 'terrestre'\n\t\t\t\tAND sv_tramite = " . $_GET['id']; $res = mysql_query($sql); $agenciaAuto = 0; $agenciaHotel = 0; while ($row = mysql_fetch_assoc($res)) { if ($row["svi_hotel_agencia"] == 1) { $agenciaAuto = 1; } if ($row["svi_renta_auto_agencia"] == 1) { $agenciaHotel = 1; } } //error_log("----------->>>>>>>>>>>>Medio de viaje: ".$medioViaje); if ($medioViaje == 1 || $agenciaAuto == 1 || $agenciaHotel == 1) { ?>