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

Report Management

Export Excel

Distributor Wise Sales Report

@if($type!='Compiled') @if(count($data['dates'])>0) @foreach($data['dates'] as $dates) @endforeach @endif @endif @if($type!='Compiled') @if(count($data['dates'])>0) @foreach($data['dates'] as $dates) @endforeach @endif @endif @php $sr = 1; @endphp @if (collect($data['data'])->count()>0) @foreach (collect($data['data'])->unique('distributor_id') as $key => $item) @php $totalCTN = 0; $totalRev = 0; @endphp @foreach($data['dates'] as $date) @php $count=0; @endphp @foreach(collect($data['data'])->where('distributor_id',$item->distributor_id) as $keyD => $itemD) @if($itemD->oDate==$date) @if($type!='Compiled') @endif @php $count++; $totalCTN += $itemD->ctn_sold; $totalRev += $itemD->revenue; @endphp @endif @endforeach @if($count==0) @if($type!='Compiled') @endif @endif @endforeach @endforeach @endif
S. No# Distributor Name{{$dates}}Total
CNT / BNDLs RevenueCNT / BNDLs Revenue
{{$sr++}} {{$item->distributor_name}}{{number_format($itemD->ctn_sold,2)}} {{number_format($itemD->revenue,2)}}0.00 0.00{{number_format($totalCTN, 2)}} {{number_format($totalRev, 2)}}
@endsection @section('scripts') @endsection