@extends('layouts.app') @section('content') @include('layouts.top-header', [ 'title' => __($businessLabelTitleCase . ' Monthly Revenue Report'), 'class' => 'col-lg-7' ])
{{__($businessLabelTitleCase . ' Monthly Revenue Report')}}
@csrf
@if($errors->any())

{{$errors->first()}}

@endif
@php $tot_income = 0; $tot_commission = 0; @endphp @foreach ($businesses as $business) @php $income = 0; $commission = 0; @endphp @foreach ($booking as $book) @if ($book->business_id == $business->business_id) @php $income = $income + $book->business_income; $commission = $commission + $book->commission; @endphp @endif @endforeach @php $tot_income = $tot_income + $income; $tot_commission = $tot_commission + $commission; @endphp @endforeach
# {{__('Image')}} {{__($businessLabelTitleCase . ' Name')}} {{__('Owner Name')}} {{__('Earnings')}} {{__('Commission')}} {{__('Revenue Month')}}
{{$loop->iteration}} {{$business->name}} {{$business->ownerName}}{{$setting->currency_symbol}}{{$income}} {{$setting->currency_symbol}}{{$commission}} {{\Carbon\Carbon::parse($business->created_at)->format('Y-m-d')}}
@endsection