Carpeta views
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
<?php require __DIR__ . '/../../includes/navBar.php'; ?>
|
||||
|
||||
<div class="container my-5">
|
||||
|
||||
<div class="card card-rounded card-shadow border-0">
|
||||
|
||||
<!-- HEADER -->
|
||||
|
||||
<div class="card-header header-dark px-4 py-3">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap gap-3">
|
||||
|
||||
<h4 class="mb-0 title-shadow">
|
||||
<i class="fas fa-shopping-cart icon-xl me-2"></i>
|
||||
Detalle de Venta N° <?= htmlspecialchars($idVenta) ?>
|
||||
</h4>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
|
||||
<!-- BOTÓN FANTASMA (mantiene el layout) -->
|
||||
|
||||
<a class="btn btn-success invisible">
|
||||
<i class="fas fa-plus me-1"></i>
|
||||
</a>
|
||||
|
||||
<a href="?opt=listar_ventas" class="btn btn-soft-secondary text-white">
|
||||
<i class="fas fa-arrow-left me-1"></i>
|
||||
Volver
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BODY -->
|
||||
|
||||
<div class="card-body px-4 py-4">
|
||||
|
||||
<?php if (empty($venta_detalle)): ?>
|
||||
<div class="text-center text-muted py-5">
|
||||
No existe el detalle de la venta.
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<!-- FILTRO POR COLUMNA + BUSCADOR -->
|
||||
|
||||
<!-- Input de búsqueda añadido automáticamente por DataTables -->
|
||||
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
<select id="columnFilter"
|
||||
class="form-select form-select-sm ms-2"
|
||||
style="width: auto;">
|
||||
<option value="0">ID Producto</option>
|
||||
<option value="1">Producto</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="tablaDetalleVenta" class="table table-hover align-middle mb-0">
|
||||
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Producto</th>
|
||||
<th>Precio Unit.</th>
|
||||
<th>Cantidad</th>
|
||||
<th>Descuento (%)</th>
|
||||
<th>Subtotal</th>
|
||||
<th>ID Pedido</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($venta_detalle as $vd): ?>
|
||||
<tr>
|
||||
<td><?= $vd['id_producto'] ?? '' ?></td>
|
||||
<td><?= htmlspecialchars($vd['marca'] . ' ' . $vd['modelo']) ?? '' ?></td>
|
||||
<td>$ <?= number_format($vd['precio_unitario'], 2, '.', ',') ?></td>
|
||||
<td><?= htmlspecialchars($vd['cantidad'] ?? '') ?></td>
|
||||
<td><?= number_format($vd['descuento_pct'], 2, '.', ',') ?> %</td>
|
||||
<td>$ <?= number_format($vd['subtotal'], 2, '.', ',') ?></td>
|
||||
<td><?= htmlspecialchars($vd['id_pedido'] ?? '') ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabla, búsqueda y filtro por columnas -->
|
||||
|
||||
<script src="js/ventas/ventaTableDetalle.js"></script>
|
||||
Reference in New Issue
Block a user