Stock by Batch: {{ $product?->product_code }}

@push('header') @endpush

{{ config('app.name') }}
Stock by Batch Report
Printed by: {{ auth()->user()->name }} | {{ now()->format('d-M-Y h:i A') }}

@if($currentStock) @endif
Product Code: {{ $product?->product_code }} Warehouse: {{ $warehouse?->warehouse_name }}
Product Name: {{ $product?->product_name }} Total Stock: {{ number_format($currentStock->quantity_on_hand ?? 0, 2) }}
Qty Available: {{ number_format($currentStock->quantity_available, 2) }} Average Cost: ₨ {{ number_format($currentStock->average_cost, 2) }}
Total Value: ₨ {{ number_format($currentStock->total_value, 2) }} Batches: {{ $currentStock->total_batches }} @if($currentStock->promotional_batches > 0) ({{ $currentStock->promotional_batches }} promotional) @endif
@php $grandTotalQty = $batches->sum('quantity_on_hand'); $grandTotalValue = $batches->sum('total_value'); @endphp @if($batches->count() > 0) @foreach($batches as $index => $batch) @endforeach
Sr# Batch Code Receipt Date Quantity Unit Cost Selling Price Total Value Priority Status
{{ $index + 1 }} {{ $batch->stockBatch->batch_code }} @if($batch->is_promotional)
🎁 Promotional @if($batch->promotional_price)
Promo: ₨ {{ number_format($batch->promotional_price, 2) }} @endif @endif @if($batch->must_sell_before)
Sell by: {{ \Carbon\Carbon::parse($batch->must_sell_before)->format('d M Y') }} @endif
{{ \Carbon\Carbon::parse($batch->stockBatch->receipt_date)->format('d-M-Y') }} {{ number_format($batch->quantity_on_hand, 2) }} ₨{{ number_format($batch->unit_cost, 2) }} @if($batch->stockBatch->selling_price) ₨{{ number_format($batch->stockBatch->selling_price, 2) }} @else @endif ₨{{ number_format($batch->total_value, 2) }} {{ $batch->priority_order }} {{ ucfirst($batch->status) }}
Grand Total {{ number_format($grandTotalQty, 2) }} ₨{{ number_format($grandTotalValue, 2) }}
@else

No stock batches found.

@endif