| |
require_once('fha-config/_codigohotel.php');
$sqlorden="SELECT clavehotel, clavehabitacion, activo, orden FROM habitacionesporhotel WHERE clavehotel=$clavehotel and activo='s' ORDER by orden";
mysql_select_db(SQL_DB);
$rsorden=mysql_query($sqlorden) or die(mysql_error());
while($roworden=mysql_fetch_array($rsorden)) {
$ordenx=$roworden['clavehabitacion'];
?>
|
Plan | echo $tipodemoneda; ?> | echo $tipodetalle; ?> |
Periodo |
SGL |
DBL |
TPL |
QPL |
MENOR 1 |
MENOR 2 |
$fechainicio = date('Y-m-d');
$fecha07 = strtotime( "$fechainicio +1 DAY");
$fecha07 = date("Y-m-d",$fecha07);
$sqllinks="SELECT t.precioSGL, t.precioDBL, t.precioTPL, t.precioQPL, t.precioMENOR1, t.precioMENOR2, t.fecha, t.activo, t.habitacion, t.hotel, h.clavehabitacion, h.descripcion, h.clavehotel, t.descuento, t.habitacion FROM tarifas as t, habitacionesporhotel as h WHERE (t.hotel=$clavehotel and t.fecha>='$fechainicio' and t.activo='s' and t.habitacion=$ordenx) and h.clavehotel=$clavehotel and h.clavehabitacion=t.habitacion ORDER by t.habitacion, t.fecha";
mysql_select_db(SQL_DB);
$rstarifas=mysql_query($sqllinks) or die(mysql_error());
$rowtarifas=mysql_fetch_array($rstarifas);
$fecha1=$rowtarifas['fecha'];
$fecha2=$rowtarifas['fecha'];
$plan1=$rowtarifas['descripcion'];
$tarifa1=(ceil($rowtarifas['precioSGL']/$tipodecambio));
$tarifa2=(ceil($rowtarifas['precioDBL']/$tipodecambio));
$tarifa3=(ceil($rowtarifas['precioTPL']/$tipodecambio));
$tarifa4=(ceil($rowtarifas['precioQPL']/$tipodecambio));
$tarifa5=(ceil($rowtarifas['precioMENOR1']/$tipodecambio));
$tarifa6=(ceil($rowtarifas['precioMENOR2']/$tipodecambio));
$descuento=$rowtarifas['descuento'];
while($rowtarifas=mysql_fetch_array($rstarifas)) {
if ($tarifa1==(ceil($rowtarifas['precioSGL']/$tipodecambio)) and
$tarifa2==(ceil($rowtarifas['precioDBL']/$tipodecambio)) and
$tarifa3==(ceil($rowtarifas['precioTPL']/$tipodecambio)) and
$tarifa4==(ceil($rowtarifas['precioQPL']/$tipodecambio)) and
$tarifa5==(ceil($rowtarifas['precioMENOR1']/$tipodecambio)) and
$tarifa6==(ceil($rowtarifas['precioMENOR2']/$tipodecambio)) and
$descuento==$rowtarifas['descuento'] and $fecha07==$rowtarifas['fecha'] and $plan1==$rowtarifas['descripcion']) {
$fecha2=$rowtarifas['fecha'];
$fecha07=strtotime( "$fecha2 +1 DAY");
$fecha07=date("Y-m-d",$fecha07);
} else {
?>
| echo $plan1; ?> |
echo substr($fecha1, 8, 2)."/".substr($fecha1, 5, 2)."/".substr($fecha1, 0, 4); ?> - echo substr($fecha2, 8, 2)."/".substr($fecha2, 5, 2)."/".substr($fecha2, 0, 4); ?> |
$ echo number_format(ceil($tarifa1), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa2), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa3), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa4), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa5), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa6), 2 , "." , ","); ?> |
$fecha1=$rowtarifas['fecha'];
$fecha07=strtotime( "$fecha1 +1 DAY");
$fecha07=date("Y-m-d",$fecha07);
$plan1=$rowtarifas['descripcion'];
$tarifa1=(ceil($rowtarifas['precioSGL']/$tipodecambio));
$tarifa2=(ceil($rowtarifas['precioDBL']/$tipodecambio));
$tarifa3=(ceil($rowtarifas['precioTPL']/$tipodecambio));
$tarifa4=(ceil($rowtarifas['precioQPL']/$tipodecambio));
$tarifa5=(ceil($rowtarifas['precioMENOR1']/$tipodecambio));
$tarifa6=(ceil($rowtarifas['precioMENOR2']/$tipodecambio));
$descuento=$rowtarifas['descuento'];
}
}
?>
| echo $plan1; ?> |
echo substr($fecha1, 8, 2)."/".substr($fecha1, 5, 2)."/".substr($fecha1, 0, 4); ?> - echo substr($fecha2, 8, 2)."/".substr($fecha2, 5, 2)."/".substr($fecha2, 0, 4); ?> |
$ echo number_format(ceil($tarifa1), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa2), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa3), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa4), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa5), 2 , "." , ","); ?> |
$ echo number_format(ceil($tarifa6), 2 , "." , ","); ?> |
Precios Expresados en echo $tipodetalle; ?>, Impuestos Incluidos |
} ?>
$sqcierre="SELECT t.fecha, t.activo FROM tarifas as t WHERE t.hotel=$clavehotel and t.fecha>='$fechainicio' and t.activo='' Group by t.fecha ORDER by t.fecha";
mysql_select_db(SQL_DB);
$rscierre=mysql_query($sqcierre) or die(mysql_error());
$totalregistros=mysql_num_rows($rscierre);
if ($totalregistros<>0) {
$cierre="";
while($rowcierre=mysql_fetch_array($rscierre)) {
$cierre="$cierre ".substr($rowcierre['fecha'], 8, 2)."/".substr($rowcierre['fecha'], 5, 2)."/".substr($rowcierre['fecha'], 0, 4)." ";
}
?>
Cierre de Fechas: echo $cierre; ?> |
} ?> |
|