203 lines
7.0 KiB
PHP
203 lines
7.0 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Venta Nº <?= $numeroVenta ?></title>
|
|
</head>
|
|
<body>
|
|
|
|
<table class="header-table">
|
|
<tr>
|
|
<!-- IZQUIERDA: Logo con nombre y datos de empresa-->
|
|
|
|
<td class="header-left">
|
|
<img src="<?= $datosEmpresa['logo_ruta'] ?>" class="logo-marca">
|
|
|
|
<div class="empresa-datos">
|
|
<?= htmlspecialchars($datosEmpresa['direccion']) ?><br>
|
|
<?= htmlspecialchars($datosEmpresa['ciudad']) ?>
|
|
(<?= htmlspecialchars($datosEmpresa['codigo_postal']) ?>) -
|
|
<?= htmlspecialchars($datosEmpresa['provincia']) ?><br>
|
|
Tel.: <?= htmlspecialchars($datosEmpresa['telefono']) ?><br>
|
|
Email: <?= htmlspecialchars($datosEmpresa['email']) ?>
|
|
</div>
|
|
</td>
|
|
|
|
<!-- DERECHA: Venta y datos fiscales -->
|
|
|
|
<td class="header-right">
|
|
<div class="venta-titulo">Resumen Venta</div>
|
|
<div class="venta-titulo-intermedio">DOCUMENTO NO VÁLIDO COMO FACTURA</div>
|
|
|
|
<div class="venta-datos">
|
|
<div><strong>Nº:</strong> <?= $numeroVenta ?></div>
|
|
<div><strong>Fecha:</strong> <?= date('d/m/Y') ?></div>
|
|
</div>
|
|
|
|
<div class="datos-fiscales">
|
|
<br>
|
|
<div><strong>IVA:</strong> <?= htmlspecialchars($datosEmpresa['cond_iva']) ?></div>
|
|
<div><strong>CUIT:</strong> <?= htmlspecialchars($datosEmpresa['cuit']) ?></div>
|
|
<div><strong>Inicio actividades:</strong> <?= htmlspecialchars($datosEmpresa['inicio_act']) ?></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr class="separator">
|
|
|
|
<table class="box-cliente">
|
|
<tr>
|
|
<td>
|
|
<table class="box-cliente-contenido">
|
|
|
|
<!-- FILA SUPERIOR -->
|
|
|
|
<tr>
|
|
<td class="box-cliente-left">
|
|
<strong>Cliente:</strong>
|
|
<?= htmlspecialchars($cliente['nombre'] . ' ' . $cliente['apellido']) ?><br>
|
|
|
|
<strong>Teléfono:</strong>
|
|
<?= htmlspecialchars($cliente['telefono']) ?><br>
|
|
|
|
<strong>Email:</strong>
|
|
<?= htmlspecialchars($cliente['email']) ?><br>
|
|
</td>
|
|
|
|
<td class="box-cliente-right">
|
|
<strong>Cond. IVA:</strong>
|
|
<?= htmlspecialchars($condIVALabel) ?><br>
|
|
|
|
<strong>CUIT:</strong>
|
|
<?= htmlspecialchars($cuit) ?>
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- SEPARADOR -->
|
|
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="box-cliente-separador"></div>
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- FILA INFERIOR -->
|
|
|
|
<tr>
|
|
<td class="box-cliente-right">
|
|
<strong>Vendedor:</strong>
|
|
<?= htmlspecialchars($vendedor['nombre'] . ' ' . $vendedor['apellido']) ?>
|
|
</td>
|
|
|
|
<td class="box-cliente-left">
|
|
<strong>Forma de Pago:</strong>
|
|
<?= htmlspecialchars($formaPagoLabel) ?>
|
|
<?php if ($tipoPagoLabel !== 'Pago Único'): ?>
|
|
(<?= htmlspecialchars($tipoPagoLabel) ?>)
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="tabla-productos">
|
|
<thead>
|
|
<tr>
|
|
<th>Cod.</th>
|
|
<th>Producto</th>
|
|
<th>Cant.</th>
|
|
<th>Precio Unit.</th>
|
|
<th>Descuento (%)</th>
|
|
<th>IVA (%)</th>
|
|
<th>Subtotal</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($productos as $p): ?>
|
|
<tr>
|
|
<td class="center"><?= htmlspecialchars($p['id_producto']) ?></td>
|
|
<td class="center"><?= htmlspecialchars($p['marca'] . ' ' . $p['modelo']) ?></td>
|
|
<td class="center"><?= $p['cantidad'] ?></td>
|
|
<td class="right">$ <?= number_format($p['precio'], 2, '.', ',') ?></td>
|
|
<td class="right"><?= number_format($p['descuento_total'], 2, '.', ',') ?> %</td>
|
|
<td class="right"><?= htmlspecialchars($datosEmpresa['iva']) ?> %</td>
|
|
<td class="right">
|
|
$ <?= number_format($p['precio_final'] * $p['cantidad'], 2, '.', ',') ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="footer-table">
|
|
<tr>
|
|
<!-- IZQUIERDA: NOTA DE VALIDEZ DE VENTA -->
|
|
|
|
<td class="footer-left">
|
|
|
|
<div class="box-titulo">Observaciones</div>
|
|
<div class="box-contenido">
|
|
|
|
<!-- Si existe se muestra el porcentaje de recargo o de descuento -->
|
|
|
|
<?php if (isset($descuentoVenta) || $descuentoVenta != 0): ?>
|
|
<?= "Descuento: " . number_format($descuentoVenta, 2, ',', '.') . ' (%)'?>
|
|
<br>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($recargoVenta) || $recargoVenta !== 0): ?>
|
|
<?= "Recargo: " . number_format($recargoVenta, 2, ',', '.') . ' (%)'?>
|
|
<br>
|
|
<?php endif; ?>
|
|
|
|
<!-- Si existe se muestra el valor de cuota -->
|
|
|
|
<?php if (isset($valorCuota)): ?>
|
|
<br>
|
|
<?= "Valor de cuota: " . htmlspecialchars($cuota . ' x $ ') . number_format($valorCuota, 2, ',', '.') ?>
|
|
<br>
|
|
El valor de cada cuota es estimativo y se calcula sobre el total de la venta al momento de su emisión.
|
|
<br><br>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<!-- DERECHA: TOTALES -->
|
|
|
|
<td class="footer-right">
|
|
<table class="box-totales">
|
|
<tr>
|
|
<td>Subtotal:</td>
|
|
<td class="right">$ <?= number_format($subtotal, 2, '.', ',') ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Descuento:</td>
|
|
<td class="right">$ <?= number_format($descuento, 2, '.', ',') ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Recargo:</td>
|
|
<td class="right">$ <?= number_format($recargo, 2, '.', ',') ?></td>
|
|
</tr>
|
|
<tr class="total-final">
|
|
<td>Total:</td>
|
|
<td class="right">$ <?= number_format($total, 2, '.', ',') ?></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
|
|
<div class="footer-pdf">
|
|
<hr class="footer-separator">
|
|
<div class="footer-text">Bytecenter</div>
|
|
</div>
|
|
|
|
</html>
|