{{ __('Stock Report') }}

@forelse($products as $row) @php $isVariant = !empty($row['is_variant']); $isBatch = !empty($row['is_batch']); $parentKey = (string) ($row['parent_key'] ?? $row['id']); $qty = (float) ($row['stock'] ?? 0); $isOutOfStock = $qty <= 0; if ($isVariant && !$isBatch) { $displayName = trim(($row['name'] ?? '') . ' - ' . ($row['variant_label'] ?? '')); } else { $displayName = $row['name'] ?? ''; } @endphp @empty @endforelse
{{ __('Barcode') }} {{ __('Product Name') }} {{ __('Batch') }} {{ __('Expiry') }} {{ __('Stock') }}
{{ $row['barcode_number'] ?: __('N/A') }}
@if(!$isVariant && (!empty($row['has_variants']) || !empty($row['has_batches']))) @elseif($isVariant) @else @endif
{{ $displayName }} @if(!$isVariant && !empty($row['has_variants'])) {{ __('Click the arrow to show variants') }} @elseif(!$isVariant && !empty($row['has_batches'])) {{ __('Click the arrow to show batch stock') }} @elseif($isBatch) {{ $isOutOfStock ? __('Out of stock') : __('Batch stock detail') }} @endif @if($isVariant && !empty($row['group_name'])) {{-- {{ $row['group_name'] }} --}} @endif
{{ $row['batch_no'] ?? __('N/A') }} {{ !empty($row['expiry_date']) ? \Illuminate\Support\Carbon::parse($row['expiry_date'])->format('d M Y') : __('N/A') }} {{ number_format($qty, 2) }} @if($isBatch && $isOutOfStock) {{ __('Out of stock') }} @endif
Koi product ya variant match nahi hua.
{{ $products->links() }}