@extends('layouts.app') @section('content') @include('layouts.top-header', [ 'title' => __($businessLabelTitleCase . ' Revenue Report'), 'class' => 'col-lg-7', ])
{{ __($businessLabelTitleCase . ' 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') }} {{ __('Name') }} {{ __('Owner Name') }} {{ __('Income') }} {{ __('Commission') }} {{ __('Pay') }} {{ __('Total Paid') }} {{ __('Registered date') }}
{{ $loop->iteration }} {{ $business->name }} {{ $business->ownerName }}{{ $setting->currency_symbol }}{{ $income }} {{ $setting->currency_symbol }}{{ $commission }} {{$business->ownerDetails->TotalAmount}} {{ \Carbon\Carbon::parse($business->created_at)->format('Y-m-d') }}
{{ __('Grand Total :') }} {{ $setting->currency_symbol }}{{ $tot_income }} {{ $setting->currency_symbol }}{{ $tot_commission }}
@endsection