{{ $lots->total() }}
Total lotes
{{ $lots->where('qc_status','approved')->count() }}
Aprobados
{{ $lots->where('qc_status','pending')->count() }}
Pendiente QC
Lotes de Inventario{{ $lots->total() }}
@forelse($lots as $lot) @php $daysLeft = $lot->expiry_date ? now()->diffInDays($lot->expiry_date, false) : null; $hasCoa = $lot->certificates->where('is_valid',true)->isNotEmpty(); @endphp @empty @endforelse
ColoranteCódigo LoteNº Proveedor RecibidoVencimiento Stock (kg) QCCOA
{{ $lot->dyestuff?->name ?? '—' }}
{{ $lot->dyestuff?->supplier ?? '' }}
{{ $lot->lot_barcode }} {{ $lot->supplier_lot_number ?: '—' }} {{ $lot->received_date->format('d/m/Y') }} {{ $lot->expiry_date?->format('d/m/Y') ?? '—' }} @if($daysLeft !== null && $daysLeft < 0)VENCIDO @elseif($daysLeft !== null && $daysLeft < 30){{ $daysLeft }}d@endif {{ number_format($lot->quantity_remaining,3) }} / {{ number_format($lot->quantity_received,3) }} {{ $lot->qc_status_label }} @if($hasCoa)✓ COA @elseSin COA@endif
@if($lot->qc_status === 'pending') @endif
No se encontraron lotes.
{{ $lots->links() }}
{{-- Certificate side panel --}} @if($viewingLot)
{{ $viewingLot->dyestuff?->name }}
{{ $viewingLot->lot_barcode }}
Certificados Registrados
@forelse($viewingLot->certificates as $cert)
{{ $cert->document_type }} {{ $cert->file_path ? basename($cert->file_path) : 'Sin archivo' }} {{ $cert->created_at->format('d/m/Y') }}
@empty

Sin certificados registrados.

@endforelse
@endif {{-- Lot modal --}} @if($showLotModal) @endif {{-- Add cert modal --}} @if($showDocModal) @endif