@php $_logoPath = public_path('img/logo1.png'); $logoSrc = file_exists($_logoPath) ? 'data:image/png;base64,' . base64_encode(file_get_contents($_logoPath)) : ''; $diasRestantes = $lote->fecha_vencimiento ? now()->diffInDays($lote->fecha_vencimiento, false) : null; $inicial = $lote->cantidad_inicial ?? $lote->cantidad_actual; $pctStock = $inicial > 0 ? min(100, ($lote->cantidad_actual / $inicial) * 100) : 0; @endphp
|
@if($logoSrc) |
Sabores de Sol by MAYBELL S.A.C.
RUC: 20612998214 | Logística
Carretera Panamericana Norte Km 56 - CP San Isidro - Motupe - Lambayeque
FICHA DE LOTE — {{ $lote->numero_lote }}
|
{{ $lote->numero_lote }}
{{ now()->format('d/m/Y H:i') }} @switch($lote->estado) @case('vigente') Vigente @break @case('por_vencer') Por vencer @break @case('vencido') Vencido @break @case('bloqueado') Bloqueado @break @default {{ ucfirst($lote->estado) }} @endswitch |
| N° Lote: | {{ $lote->numero_lote }} | Producto: | {{ $lote->producto->nombre }} ({{ $lote->producto->codigo }}) |
| Categoría: | {{ optional($lote->producto->categoria)->nombre ?? '—' }} | Unidad de Medida: | {{ optional($lote->producto->unidadMedida)->nombre ?? '—' }} ({{ optional($lote->producto->unidadMedida)->abreviatura ?? '—' }}) |
| Almacén: | {{ $lote->almacen->nombre }} | Proveedor: | {{ optional($lote->proveedor)->razon_social ?? '—' }} |
| Fecha Ingreso: | {{ $lote->fecha_ingreso ? \Carbon\Carbon::parse($lote->fecha_ingreso)->format('d/m/Y') : '—' }} | Fecha Vencimiento: | @if($lote->fecha_vencimiento) {{ \Carbon\Carbon::parse($lote->fecha_vencimiento)->format('d/m/Y') }} @if($diasRestantes !== null) @if($diasRestantes <= 0) Vencido hace {{ abs((int)$diasRestantes) }}d @elseif($diasRestantes <= 7) Vence en {{ (int)$diasRestantes }}d @elseif($diasRestantes <= 30) {{ (int)$diasRestantes }} días @endif @endif @else — @endif |
| Cantidad Inicial: | {{ number_format($lote->cantidad_inicial ?? 0, 3) }} {{ optional($lote->producto->unidadMedida)->abreviatura ?? '' }} | Cantidad Actual: | {{ number_format($lote->cantidad_actual, 3) }} {{ optional($lote->producto->unidadMedida)->abreviatura ?? '' }} |
| % Stock restante: | {{ number_format($pctStock, 1) }}% del lote original | ||
| Costo Unitario: | S/ {{ number_format($lote->costo_unitario, 4) }} | Valor en Stock: | S/ {{ number_format($lote->cantidad_actual * $lote->costo_unitario, 2) }} |
| Observaciones: | {{ $lote->observaciones }} | ||
| Fecha | Tipo | Cantidad | Referencia | Usuario | Observación |
|---|---|---|---|---|---|
| {{ $mov->created_at->format('d/m/Y H:i') }} | @if($esEntrada) ↓ {{ ucfirst(str_replace('_', ' ', $mov->tipo)) }} @elseif($esSalida) ↑ {{ ucfirst(str_replace('_', ' ', $mov->tipo)) }} @else {{ ucfirst(str_replace('_', ' ', $mov->tipo)) }} @endif | {{ $esEntrada ? '+' : ($esSalida ? '-' : '') }}{{ number_format($mov->cantidad, 3) }} | {{ $mov->referencia ?? '—' }} | {{ optional($mov->usuario)->name ?? '—' }} | {{ $mov->observacion ?? '—' }} |
| No hay movimientos registrados para este lote. | |||||
| Totales: | +{{ number_format($totalEntradas, 3) }} / -{{ number_format($totalSalidas, 3) }} | ||||