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

Category Sales Report

Export Excel

Territorial Monthly Sale

@foreach ($data['areas'] as $dt) @endforeach @foreach ($data['areas'] as $dt) @foreach ($dt->territories as $tr) @endforeach @endforeach @foreach ($data['cats'] as $cat) @foreach ($data['areas'] as $dt) @foreach ($dt->territories as $tr) @php $netsales = collect($data['orders'])->where('sub_cat',$cat->sub_category_id)->where('area_id',$tr->area_id)->where('category_id',$tr->category_id)->first(); $netsale = (float)$netsales->net_sale; @endphp @endforeach @endforeach @endforeach
Main Category Sub Category{{$dt->area_name}}
{{$tr->territory_name}}
{{$cat->main_category_name}} {{$cat->sub_category_name}}{{number_format($netsale,2)}}
@endsection @section('scripts') @endsection