{{--{{dd($data)}}--}}

Stock Allocation Report Start Date: {{$_GET['dateFrom']}}End Date: {{$_GET['dateTo']}}Generated On: {{Date('d-M-Y')}}

Distributor Name: {{ $distributor ? $distributor->distributor_name:'N/A'}} Allocated QTY {{number_format($allocations ? collect($allocations)->sum('booked_qty'):0)}}
Distributor Code: {{$distributor? $distributor->distributor_code:'N/A'}} Extra issuance {{number_format($allocations ? collect($allocations)->sum('extra_issue'):0)}}
TSM: {{ $distributor ? $distributor->tsm:'N/A'}} Total issuance {{number_format($allocations ? collect($allocations)->sum('ttl_allocated_qty'):0)}}
LOADs: {{ collect($data)->count() }} Gross Value Rs. {{number_format($allocations ? collect($allocations)->sum('gross_value'):0,2)}}
@if ($data->count()>0) @php $g_booked = 0; $g_allocated = 0; $g_extra = 0; $g_ttl_allocated = 0; $g_gross_value = 0; @endphp @foreach ($data as $assignment) @php $t_booked = 0; $t_allocated = 0; $t_extra = 0; $t_ttl_allocated = 0; $t_gross_value = 0; @endphp @foreach (collect($assignment->items) as $item) @php $t_booked += $item->booked_qty; $t_allocated += $item->allocated_qty; $t_extra += $item->extra_issue; $t_ttl_allocated += $item->ttl_allocated_qty; $t_gross_value += $item->gross_value; @endphp @endforeach @php $g_booked += $t_booked; $g_allocated += $t_allocated; $g_extra += $t_extra; $g_ttl_allocated += $t_ttl_allocated; $g_gross_value += $t_gross_value; @endphp @endforeach @else @endif
SKU Product T.P Booked
QTY
ALLOC
QTY
Extra
QTY
TTL.ALLOC
QTY
Gross Value
Load ID:{{$assignment->load_id ? $assignment->load_id:'NA'}},   Booker Name:{{$assignment->details->booker_name}},  Salesman Name:{{$assignment->details->saleman_name}}
{{$item->item_sku}} {{$item->item_name}} {{number_format($item->item_trade_price)}} {{number_format($item->booked_qty)}} {{number_format($item->allocated_qty)}} {{number_format($item->extra_issue)}} {{number_format($item->ttl_allocated_qty)}} {{number_format($item->gross_value,2)}}
TOTAL {{number_format($t_booked)}} {{number_format($t_allocated)}} {{number_format($t_extra)}} {{number_format($t_ttl_allocated)}} {{number_format($t_gross_value,2)}}
GRAND TOTAL {{number_format($g_booked)}} {{number_format($g_allocated)}} {{number_format($g_extra)}} {{number_format($g_ttl_allocated)}} {{number_format($g_gross_value,2)}}
No data found.