@if ($period) @endif @unless ($period) {{ __('Your account does not have access to the platform’s numbers.') }} @else @php($total = array_sum($standing))
{{-- the number that needs a phone call: switched on but no longer paid for, or never activated at all --}}
@forelse ($endingSoon as $restaurant) {{ $restaurant->name }}
#{{ $restaurant->id }}
{{ \Illuminate\Support\Carbon::parse($restaurant->paid_until)->toDateString() }}
{{ \Illuminate\Support\Carbon::parse($restaurant->paid_until)->endOfDay()->diffForHumans() }}
@can('activate restaurants') {{ __('Renew') }} @endcan
@empty {{ __('Nothing runs out in the next two weeks.') }} @endforelse
@if ($topPayers->isEmpty())

{{ __('No commission in this period yet.') }}

@else @php($top = (float) $topPayers->max('total') ?: 1)
@foreach ($topPayers as $row)
{{ $row->restaurant?->name ?? '—' }}
@endforeach
@endif
@foreach ([ 'active' => [__('Active'), 'ok'], 'lapsed' => [__('Subscription ended, still on'), 'warn'], 'suspended' => [__('Suspended'), 'bad'], 'expired' => [__('Expired'), 'muted'], 'new' => [__('Not activated yet'), 'info'], ] as $state => [$label, $tone])
{{ $label }}
{{ $standing[$state] }}
@endforeach
@can('view restaurants') {{ __('Open the restaurant list') }} @endcan
@forelse ($lowest as $restaurant) @empty

{{ __('No restaurant is switched on.') }}

@endforelse

{{ __('Commission is debited from the wallet on delivery; a restaurant that reaches zero is switched off.') }}

{{ __('Orders') }}
{{ $period['orders'] }}
{{ __('Delivered') }}
{{ $period['delivered'] }}
{{ __('Goods sold') }}
{{ __('New restaurants') }}
{{ $period['new_restaurants'] }}
@endunless