{{ __('Stock Report') }}

{{-- --}} @forelse($products as $row) @php $isVariant = !empty($row['is_variant']); $parentKey = (string) ($row['parent_key'] ?? $row['id']); $qty = (float) ($row['stock'] ?? 0); $purUnit = (float) ($row['purchase_rate'] ?? 0); $saleUnit = (float) ($row['sale_rate'] ?? 0); $rowPurchaseTotal = (float) ($row['row_purchase_total'] ?? ($qty * $purUnit)); $rowSaleTotal = (float) ($row['row_sale_total'] ?? ($qty * $saleUnit)); $displayName = $isVariant ? trim(($row['name'] ?? '') . ' - ' . ($row['variant_label'] ?? '')) : ($row['name'] ?? ''); @endphp {{-- --}} @empty @endforelse
{{ __('Product Name') }} {{ __('Stock') }} {{ __('Barcode') }} {{ __('Purchase Price (Rs)') }} {{ __('Sale Price (Rs)') }}Image
@if(!$isVariant && !empty($row['has_variants'])) @elseif($isVariant) @else @endif
{{ $displayName }} @if(!$isVariant && !empty($row['has_variants'])) {{ __('Click the arrow to show variants') }} @endif @if($isVariant && !empty($row['group_name'])) {{-- {{ $row['group_name'] }} --}} @endif {{ __('Purchase:') }} Rs {{ number_format($purUnit, 2) }} {{ __('Sale:') }} Rs {{ number_format($saleUnit, 2) }}
{{ number_format($qty, 2) }} {{ $row['barcode_number'] ?? __('N/A') }} {{ number_format($rowPurchaseTotal, 2) }} {{ number_format($rowSaleTotal, 2) }} @if(!empty($product->product_image)) {{ $product->name }} @else {{ __('N/A') }} @endif
Koi product ya variant match nahi hua.
{{ __('Totals:') }} {{ number_format($totalPurchaseValue, 2) }} {{ number_format($totalSaleValue, 2) }}
{{ $products->links() }}