feat: Añade página para mostrar comprobante de venta
This commit is contained in:
parent
6b5a5d25b4
commit
ee656c157c
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
// comprobante.php - Página de comprobante de venta
|
||||
session_start();
|
||||
|
||||
// Verificar si hay un comprobante en la sesión
|
||||
if (!isset($_SESSION['comprobante'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$comprobante = $_SESSION['comprobante'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Comprobante de Venta</title>
|
||||
<link rel="stylesheet" href="css/comprobante.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Comprobante de Venta</h1>
|
||||
|
||||
<div class="comprobante" id="comprobante-imprimible">
|
||||
<div class="header">
|
||||
<h2>Boletos para Concierto - Sala Principal</h2>
|
||||
</div>
|
||||
|
||||
<div class="info-venta">
|
||||
<div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Nº de Venta:</span>
|
||||
<span><?php echo $comprobante['id_venta']; ?></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Fecha:</span>
|
||||
<span><?php echo $comprobante['fecha']; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Cliente:</span>
|
||||
<span><?php echo $comprobante['cliente']; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Detalle de Boletos</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Ubicación</th>
|
||||
<th>Precio</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($comprobante['boletos'] as $index => $boleto): ?>
|
||||
<tr>
|
||||
<td><?php echo $index + 1; ?></td>
|
||||
<td>Fila <?php echo $boleto['fila']; ?>, Asiento <?php echo $boleto['numero']; ?></td>
|
||||
<td>$<?php echo number_format($boleto['precio'], 2); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="total">
|
||||
Total: $<?php echo number_format($comprobante['total'], 2); ?>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 40px; font-size: 14px; text-align: center;">
|
||||
<p>¡Gracias por su compra!</p>
|
||||
<p>Este comprobante es su entrada oficial para el evento.</p>
|
||||
<p>Por favor, preséntelo en la entrada del concierto.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="acciones">
|
||||
<a href="index.php" class="btn">Volver a Ventas</a>
|
||||
<button class="btn btn-print" onclick="imprimirComprobante()">Imprimir Comprobante</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/comprobante.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue