@extends('layouts.master') @section('styles') @endsection @section('content')
| S. No# | Distributor Name | Order Booker | Segment | @if($type!='Compiled') @if(count($data['dates'])>0) @foreach($data['dates'] as $dates){{$dates}} | @endforeach @endif @endifTotal | ||||
|---|---|---|---|---|---|---|---|---|---|
| CNT / BNDLs | Revenue | @endforeach @endif @endifCNT / BNDLs | Revenue | ||||||
| {{$sr++}} | {{$item->distributor_name}} | {{$item->employee}} | {{$item->segment}} | @foreach($data['dates'] as $date) @php $count=0; @endphp @foreach(collect($data['data'])->where('employee_id',$item->employee_id) as $keyD => $itemD) @if($itemD->date==$date) @if($type!='Compiled'){{number_format($itemD->ctn_sold,2)}} | {{number_format($itemD->revenue,2)}} | @endif @php $count++; $totalCTN += $itemD->ctn_sold; $totalRev += $itemD->revenue; @endphp @endif @endforeach @if($count==0) @if($type!='Compiled')0.00 | 0.00 | @endif @endif @endforeach{{number_format($totalCTN, 2)}} | {{number_format($totalRev, 2)}} |