This commit is contained in:
Lizandro Guarnizo
2026-01-06 15:35:59 -05:00
commit a768146f65
602 changed files with 42505 additions and 0 deletions
@@ -0,0 +1,190 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alerta de Stock</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background-color: #f4f4f4;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.header {
text-align: center;
color: #333;
border-bottom: 2px solid #007bff;
padding-bottom: 10px;
margin-bottom: 20px;
}
.alert-section {
margin-bottom: 30px;
}
.alert-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
padding: 10px;
border-radius: 5px;
}
.alert-minimo {
background-color: #fff3cd;
color: #856404;
border: 1px solid #ffeaa7;
}
.alert-maximo {
background-color: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
.product-table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
.product-table th,
.product-table td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.product-table th {
background-color: #007bff;
color: white;
}
.product-table tr:nth-child(even) {
background-color: #f2f2f2;
}
.stock-warning {
color: #dc3545;
font-weight: bold;
}
.stock-info {
color: #17a2b8;
font-weight: bold;
}
.footer {
margin-top: 30px;
text-align: center;
color: #666;
font-size: 14px;
border-top: 1px solid #ddd;
padding-top: 15px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🚨 Alerta de Niveles de Stock</h1>
<p>Fecha: {{ now()->format('d/m/Y H:i:s') }}</p>
</div>
@if($productosStockMinimo->isNotEmpty())
<div class="alert-section">
<div class="alert-title alert-minimo">
⚠️ Productos con Stock Mínimo o Inferior ({{ $productosStockMinimo->count() }} productos)
</div>
<table class="product-table">
<thead>
<tr>
<th>Producto</th>
<th>Categoría</th>
<th>Stock Actual</th>
<th>Stock Mínimo</th>
<th>Stock Máximo</th>
<th>Estado</th>
</tr>
</thead>
<tbody>
@foreach($productosStockMinimo as $producto)
@php
$stockActual = $producto->variants()->exists()
? $producto->variants()->sum('stock')
: $producto->stock;
@endphp
<tr>
<td>{{ $producto->nombre }}</td>
<td>{{ $producto->categoria->nombre ?? 'Sin categoría' }}</td>
<td class="stock-warning">{{ $stockActual }}</td>
<td>{{ $producto->stock_minimo }}</td>
<td>{{ $producto->stock_maximo ?? 'No definido' }}</td>
<td>
@if($stockActual == 0)
<span style="color: #dc3545;">🔴 Sin Stock</span>
@elseif($stockActual < $producto->stock_minimo)
<span style="color: #fd7e14;">🟠 Por debajo del mínimo</span>
@else
<span style="color: #ffc107;">🟡 En mínimo</span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
@if($productosStockMaximo->isNotEmpty())
<div class="alert-section">
<div class="alert-title alert-maximo">
📈 Productos que Exceden el Stock Máximo ({{ $productosStockMaximo->count() }} productos)
</div>
<table class="product-table">
<thead>
<tr>
<th>Producto</th>
<th>Categoría</th>
<th>Stock Actual</th>
<th>Stock Mínimo</th>
<th>Stock Máximo</th>
<th>Exceso</th>
</tr>
</thead>
<tbody>
@foreach($productosStockMaximo as $producto)
@php
$stockActual = $producto->variants()->exists()
? $producto->variants()->sum('stock')
: $producto->stock;
$exceso = $stockActual - $producto->stock_maximo;
@endphp
<tr>
<td>{{ $producto->nombre }}</td>
<td>{{ $producto->categoria->nombre ?? 'Sin categoría' }}</td>
<td class="stock-info">{{ $stockActual }}</td>
<td>{{ $producto->stock_minimo }}</td>
<td>{{ $producto->stock_maximo }}</td>
<td style="color: #007bff; font-weight: bold;">+{{ $exceso }} unidades</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
@if($productosStockMinimo->isEmpty() && $productosStockMaximo->isEmpty())
<div style="text-align: center; padding: 40px; color: #28a745;">
<h2> Todos los productos están en niveles normales de stock</h2>
<p>No hay productos que requieran atención inmediata.</p>
</div>
@endif
<div class="footer">
<p><strong>Sistema de Gestión POS</strong></p>
<p>Este es un correo automático. No responda a este mensaje.</p>
<p>Para más información, acceda al sistema de administración.</p>
</div>
</div>
</body>
</html>
@@ -0,0 +1,26 @@
<h2>Cotización</h2>
<table border="1" cellpadding="5" cellspacing="0" width="100%">
<thead>
<tr>
<th>Producto</th>
<th>Variante</th>
<th>Cantidad</th>
<th>Precio unitario</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
@foreach ($carrito as $item)
<tr>
<td>{{ $item['nombre'] }}</td>
<td>{{ $item['variante'] ?? '-' }}</td>
<td>{{ $item['cantidad'] }}</td>
<td>${{ number_format($item['precio_venta'], 2) }}</td>
<td>${{ number_format($item['precio_venta'] * $item['cantidad'], 2) }}</td>
</tr>
@endforeach
</tbody>
</table>
<h3>Total: ${{ number_format($total, 2) }}</h3>
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html>
<head>
<style>
table {
width: 100%;
border-collapse: collapse;
font-size: 12px; /* Reduce el tamaño de la fuente */
}
th, td {
border: 1px solid #ddd;
padding: 6px; /* Reduce el padding para que la tabla quede más compacta */
}
th {
background-color: #f2f2f2;
text-align: left;
}
.total {
font-weight: bold;
font-size: 14px; /* Mantén el tamaño de la fuente mayor para los totales */
}
</style>
</head>
<body>
<h2 style="font-size: 16px;">Reporte de Ventas Variedades La revolución de los Precios bajos</h2> <!-- Reduce también el tamaño del título -->
<p style="font-size: 12px;">Desde: {{ $fromDate }} | Hasta: {{ $toDate }}</p>
<table>
<thead>
<tr>
<th>Fecha</th>
<th>Cliente</th>
<th>Total</th>
<th>Detalles</th>
</tr>
</thead>
<tbody>
@php
$totalGeneral = 0;
$ventasPorDia = [];
@endphp
@foreach($ventas as $venta)
@php
$fecha = $venta->created_at->format('Y-m-d');
$ventasPorDia[$fecha][] = $venta;
$totalGeneral += $venta->total;
@endphp
@endforeach
@foreach($ventasPorDia as $fecha => $ventasDelDia)
<tr>
<td colspan="4" class="total">Ventas del día: {{ $fecha }}</td>
</tr>
@php
$totalDia = 0;
@endphp
@foreach($ventasDelDia as $venta)
<tr>
<td>{{ $venta->created_at->format('Y-m-d') }}</td>
<td>{{ $venta->cliente->nombre ?? 'Sin cliente' }}</td>
<td>${{ number_format($venta->total, 2) }}</td>
<td>
@foreach($venta->detalles as $detalle)
{{ $detalle->producto->nombre ?? 'Producto eliminado' }} x {{ $detalle->cantidad }}<br>
@endforeach
</td>
</tr>
@php
$totalDia += $venta->total;
@endphp
@endforeach
<tr>
<td colspan="2" class="total">Total del día</td>
<td class="total">${{ number_format($totalDia, 2) }}</td>
<td></td>
</tr>
@endforeach
<tr>
<td colspan="2" class="total">Total General</td>
<td class="total">${{ number_format($totalGeneral, 2) }}</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<title>Bienvenido a La revolución de los Precios bajos - POS</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f5f7;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 30px auto;
background: white;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.header {
background-color: #1a1a2e;
color: white;
padding: 20px;
text-align: center;
font-size: 24px;
}
.content {
padding: 30px;
color: #333;
}
.button {
display: inline-block;
padding: 12px 20px;
margin: 20px 0;
background-color: #1a1a2e;
color: white;
text-decoration: none;
border-radius: 6px;
font-size: 16px;
text-align: center;
}
.footer {
text-align: center;
padding: 15px;
font-size: 12px;
color: #888;
background: #f4f5f7;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
Bienvenido a la Plataforma
</div>
<div class="content">
<h2>Hola, {{ $name }} 👋</h2>
<p>Nos alegra darte la bienvenida a nuestro sistema. Aquí están tus credenciales de acceso:</p>
<ul>
<li><strong>Email:</strong> {{ $email }}</li>
<li><strong>Contraseña:</strong> {{ $password }}</li>
</ul>
<p>Accede a la plataforma con el siguiente botón:</p>
<p style="text-align: center;">
<a href="{{ $loginUrl }}" class="button">Iniciar Sesión</a>
</p>
</div>
<div class="footer">
Sistema POS - Derechos Reservados
</div>
</div>
</body>
</html>