From Date: {{ $from_date }}     To Date: {{ $to_date }}     Staff Name:{{ $staffname }}
@foreach ($units as $unit) @endforeach @php $unitorders = $orderItems->groupBy('stock_item_id'); @endphp @foreach ($unitorders as $item) @php $orderUnits = $item->pluck('unit_id')->toArray(); @endphp @foreach ($units as $unit) @if (in_array($unit->id, $orderUnits)) @else @endif @endforeach @endforeach
s.no Product Name{{ $unit->name }}
{{ $loop->iteration }} {{ $item[0]->stockItem->name }} {{ $item->where('unit_id', $unit->id)->first()->base_qty }}