-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReporteReservas.php
More file actions
128 lines (93 loc) · 4.7 KB
/
Copy pathReporteReservas.php
File metadata and controls
128 lines (93 loc) · 4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
session_start();
require_once 'funciones/corroborar_usuario.php';
Corroborar_Usuario();
ob_start();
require_once "conn/conexion.php";
$conexion = ConexionBD();
// Generación del listado de reservas
require_once 'funciones/CRUD-Reservas.php';
$ListadoReservas = Listar_Reservas($conexion);
$CantidadReservas = count($ListadoReservas);
include('head.php');
?>
<body class="bg-light" style="margin: 0 auto;">
<div class="wrapper" style="margin-bottom: 40px; min-height: 100%; overflow: hidden;">
<div class="container" style="max-width: 97%;">
<div class="table-responsive p-5 mb-4 bg-white shadow-sm" style="max-width: 97%; max-height: 700px; margin-top: 10%; border: 2px solid #5250ab; border-radius: 14px;">
<h2 class="mb-4 text-secondary">
<strong>Reporte: Reservas de vehículos </strong>
</h2>
<!-- Tabla con reporte de reservas -->
<table class="table table-striped table-hover" id="tablaReservas">
<thead>
<tr>
<th style='color: #d19513;'><h3>#</h3></th>
<th>Nro</th>
<th>Apellido</th>
<th>Nombre</th>
<th>DNI</th>
<th>Matrícula</th>
<th>Grupo</th>
<th>Modelo</th>
<th>Fec. Ret.</th>
<th>Fec. Dev.</th>
<th>Montos</th>
</tr>
</thead>
<tbody>
<?php
$contador = 1;
for ($i=0; $i < $CantidadReservas; $i++) { ?>
<tr class='reserva' data-id='<?php echo $ListadoReservas[$i]['idReserva']; ?>'
onclick="selectRow(this, '<?= $ListadoReservas[$i]['idReserva'] ?>')" >
<td><span style='color: #d19513;'><h4> <?php echo $contador; ?> </h4></span></td>
<td> <?php echo $ListadoReservas[$i]['idReserva']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['apellidoCliente']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['nombreCliente']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['dniCliente']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['vehiculoMatricula']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['vehiculoGrupo']; ?> </td>
<td> <?php echo $ListadoReservas[$i]['vehiculoModelo']; ?> </td>
<td> <?php echo date('d/m/Y', strtotime($ListadoReservas[$i]['fechaInicioReserva'])); ?> </td>
<td> <?php echo date('d/m/Y', strtotime($ListadoReservas[$i]['fechaFinReserva'])); ?> </td>
<td>
<span style="font-size: 12px; color: purple;">
<?php echo "$ {$ListadoReservas[$i]['precioPorDiaReserva']} USD/día <br>
{$ListadoReservas[$i]['cantidadDiasReserva']} días <br>
Total: $ {$ListadoReservas[$i]['totalReserva']} USD";
?>
</span>
</td>
</tr>
<?php $contador++; ?>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- Botones de acción -->
<div style="margin-top: 10px; margin-bottom: 5%;">
<div class="container d-flex justify-content-center">
<span style="margin-right: 10%;">
<a href="reservas.php"> <button class="btn" style="color: white; background-color: #5250ab;" >
Volver
</button></a>
</span>
<a href="ReporteReservas_pdf.php" target="_blank"> <button class="btn btn-warning" >
Imprimir
</button></a>
</div>
</div>
<div>
<?php require_once "foot.php"; ?>
</div>
</body>
</html>
<?php
$html = ob_get_clean();
echo $html; // La variable $html ahora contiene la totalidad de la página. Imprimo en pantalla para que se continue viendo la página web
?>