Carpeta views

This commit is contained in:
Axel Axt
2026-08-04 19:24:53 -03:00
parent 6aaff2ffe4
commit d95e4012a4
54 changed files with 10640 additions and 0 deletions
@@ -0,0 +1,95 @@
<?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-wrench icon-xl me-2"></i>
Insumos de Servicio N° <?= htmlspecialchars($idServicio) ?>
</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_servicios" 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($servicio_detalle)): ?>
<div class="text-center text-muted py-5">
No existe el detalle del servicio o no se utilizaron insumos.
</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 Insumo</option>
<option value="1">Insumo</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>Insumo</th>
<th>Precio Unit.</th>
<th>Cantidad</th>
<th>Subtotal</th>
<th>ID Pedido</th>
</tr>
</thead>
<tbody>
<?php foreach ($servicio_detalle as $sd): ?>
<tr>
<td><?= $sd['id_insumo'] ?? '' ?></td>
<td><?= htmlspecialchars($sd['marca'] . ' ' . $sd['modelo']) ?? '' ?></td>
<td>$ <?= number_format($sd['precio_unitario'], 2, '.', ',') ?></td>
<td><?= htmlspecialchars($sd['cantidad'] ?? '') ?></td>
<td>$ <?= number_format($sd['subtotal'], 2, '.', ',') ?></td>
<td><?= htmlspecialchars($sd['id_pedido'] ?? '') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</div>
</div>
</div>
<!-- Tabla, búsqueda y filtro por columnas -->
<script src="js/servicios/servicioTableDetalleInsumos.js"></script>