@extends('layouts.master') @section('styles') @endsection @section('content')

Report Management

Export Excel View PDF

Distributor Stock Report

@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 @endif
Code/SKU Product T.P Booked QTY Allocated QTY Extra QTY TTL Allocated 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)}}
@endsection @section('scripts') @endsection