@php use Illuminate\Support\Facades\DB; $monthWise = []; $target_target_arr = []; $netsale_target_arr = []; $achvment_target_arr = []; $gawt_target = 0; $gdt_target = 0; $gdt_cus_target = 0; error_reporting(0); @endphp
Per Capita Consumption Report
Start Month: {{date('M-Y',strtotime($start_date))}} End Month: {{date('M-Y',strtotime($end_date))}}
@foreach($months as $month) @endforeach {{-- --}} @foreach($months as $month) @endforeach {{-- --}} @foreach($cities as $city) @php $city_arr =collect($data)->where('city_id', $city->id)->all(); $row = collect($city_arr)->first(); @endphp @foreach($months as $month) @php $month_wise =collect($city_arr)->where('date', $month)->first(); @endphp @endforeach @endforeach
City/Town Province Name City/Town Tier Population{{date('M-Y',strtotime($month.'-01'))}}Overall
Net Sales (CTNs) Net Sales (PCs) Per Capita Cons.Per Capita Cons. Net Sales
{{$row->city_name}} {{$row->province_name}} {{$row->tier_name}} {{$row->population}}{{$month_wise->net_sale}} {{$month_wise->total_pieces}} {{number_format($month_wise->per_capita,2)}}