{{ __('Low Stock Report') }}

{{-- {{ __('Products aur variants jo alert quantity tak ya us se neeche aa gaye hon.') }} --}}
{{ __('Low Stock Items') }}
{{ number_format((int) $products->total()) }}
{{ __('Total Stock') }}
{{ number_format($totalStock, 2) }}
{{ __('Total Shortage') }}
{{ number_format($totalShortage, 2) }}
@forelse($products as $row) @php $isVariant = ! empty($row['is_variant']); $qty = (float) ($row['stock'] ?? 0); $alertQty = (float) ($row['alert_quantity'] ?? 0); $shortage = max($alertQty - $qty, 0); $displayName = $isVariant ? trim(($row['name'] ?? '') . ' - ' . ($row['variant_label'] ?? '')) : ($row['name'] ?? ''); @endphp @empty @endforelse
{{ __('Product Name') }} {{ __('Stock') }} {{ __('Alert Qty') }} {{ __('Shortage') }} {{ __('Barcode') }}
@if($isVariant) @else @endif
{{ $displayName }} @if($isVariant && !empty($row['group_name'])) {{ $row['group_name'] }} @endif
{{ number_format($qty, 2) }} {{ number_format($alertQty, 2) }} {{ number_format($shortage, 2) }} {{ $row['barcode_number'] ?? __('N/A') }}
{{ __('No low stock items found for selected filters.') }}
{{ __('Totals:') }} {{ number_format($totalStock, 2) }} {{ number_format($totalAlert, 2) }} {{ number_format($totalShortage, 2) }}
{{ $products->links() }}