{{-- Today / this week / this month in the driver's local time: the figures the driver app shows, plus how offers were answered. --}} @php $offers = $performance['offers']; $minutes = $performance['online_minutes']; $hours = intdiv($minutes, \Carbon\CarbonInterface::MINUTES_PER_HOUR); $from = \Illuminate\Support\Carbon::parse($performance['from']); $to = \Illuminate\Support\Carbon::parse($performance['to']); @endphp
@foreach ([ [__('Trips'), number_format($performance['trips']), null], [__('Earnings'), money($performance['net']), __('Fares :gross, commission :commission', ['gross' => money($performance['gross']), 'commission' => money($performance['commission'])])], [__('Tips & bonuses'), money($performance['tips'] + $performance['bonuses']), __('Tips :tips, bonuses :bonuses', ['tips' => money($performance['tips']), 'bonuses' => money($performance['bonuses'])])], [__('Cash collected'), money($performance['cash_collected']), __('Fares paid in cash')], [__('Online time'), $hours ? __(':hours h :minutes min', ['hours' => $hours, 'minutes' => $minutes % \Carbon\CarbonInterface::MINUTES_PER_HOUR]) : __(':minutes min', ['minutes' => $minutes]), null], [__('Acceptance rate'), $offers['acceptance_rate'] === null ? '—' : $offers['acceptance_rate'].'%', $offers['total'] ? trans_choice(':accepted of :total offer|:accepted of :total offers', $offers['total'], ['accepted' => $offers['accepted'], 'total' => $offers['total']]) : __('No offers')], ] as [$label, $value, $hint])
{{ $label }}
{{ $value }}
@if ($hint)
{{ $hint }}
@endif
@endforeach

{{ $from->equalTo($to) ? $from->toFormattedDateString() : $from->toFormattedDateString().' – '.$to->toFormattedDateString() }}, {{ __('in the driver\'s local time.') }} @if ($offers['total']) {{ __('Declined :declined, missed :missed.', ['declined' => $offers['declined'], 'missed' => $offers['missed']]) }} @endif @if ($offers['withdrawn']) {{ trans_choice(':count offer was withdrawn (taken by another driver or cancelled by the rider) and doesn\'t count.|:count offers were withdrawn (taken by another driver or cancelled by the rider) and don\'t count.', $offers['withdrawn']) }} @endif