Stock Report

Generated: {{ now()->format('d M Y H:i') }}

@if(!empty($data['low_stock']))

⚠ Low Stock Items ({{ count($data['low_stock']) }})

@foreach($data['low_stock'] as $product) @php $item = is_array($product) ? $product : $product->toArray(); @endphp @endforeach
ProductGeneric NameCategory AvailableMin Threshold
{{ $item['name'] }} {{ $item['generic_name'] ?? '-' }} {{ $item['category']['name'] ?? '-' }} {{ number_format((float)($item['available_quantity'] ?? 0), 2) }} {{ number_format((float)($item['minimum_stock_threshold'] ?? 0), 2) }}
@endif @if(!empty($data['near_expiry'])) @php $nearExpiry = is_object($data['near_expiry']) && method_exists($data['near_expiry'], 'items') ? $data['near_expiry']->items() : ($data['near_expiry'] ?? []); @endphp

📅 Near-Expiry Batches ({{ count($nearExpiry) }})

@foreach($nearExpiry as $batch) @php $item = is_array($batch) ? $batch : $batch->toArray(); @endphp @endforeach
ProductBatch #Expiry DateStore Available Qty
{{ $item['product']['name'] ?? '-' }} {{ $item['batch_number'] ?? '-' }} {{ $item['expiry_date'] ?? '-' }} {{ $item['store']['name'] ?? '-' }} {{ number_format((float)($item['quantity_available'] ?? 0), 2) }}
@endif