{{ $pageTitle ?? ''}}

@include('report.adminfilter')
@if(count($data) > 0) @foreach ($data as $values) @php $completed_ride_history = $values->rideRequestHistory()->where('history_type','completed')->first(); $in_progress_ride_history = $values->rideRequestHistory()->where('history_type','in_progress')->first(); @endphp @endforeach @else @endif
{{ __('message.ride_request_id') }} {{ __('message.title_name',['title' => __('message.rider')]) }} {{ __('message.title_name',['title' => __('message.driver')]) }} {{ __('message.pickup_date_time') }} {{ __('message.drop_date_time') }} {{ __('message.total_amount') }} {{ __('message.admin_commission') }} {{ __('message.driver_commission') }} {{ __('message.created_at') }}
{{ $values->id }} {{ optional($values->rider)->display_name ?? '-' }} {{ optional($values->driver)->display_name ?? '-' }} {{ dateAgoFormate($in_progress_ride_history->datetime,true) ?? '-' }} {{ dateAgoFormate($completed_ride_history->datetime,true) ?? '-' }} {{ getPriceFormat(optional($values->payment)->total_amount) ?? '-' }} {{ getPriceFormat(optional($values->payment)->admin_commission) ?? '-' }} {{ getPriceFormat(optional($values->payment)->driver_commission) ?? '-' }} {{ dateAgoFormate($values->created_at, true) }}
{{ __('message.total_amount') }} {{ getPriceFormat($data->sum('payment.total_amount')) }} {{ getPriceFormat($data->sum('payment.admin_commission')) }} {{ getPriceFormat($data->sum('payment.driver_commission')) }}
{{ __('message.no_record_found') }}
@section('bottom_script') @endsection