@section('title', __('Prices and Cancellations'))
{{-- ===== simulador ===== --}}

{{ __('Live simulation') }}



{{ __('Driver share') }}: {{ $comissaoGlobal }}% ({{ __('individual value in the driver profile overrides it') }})

@foreach ($fares as $id => $f) @endforeach
{{ __('Vehicle type') }} {{ __('Ride price') }} {{ __('Driver gets') }} {{ __('Platform gets') }} {{ __('Per km') }}
{{ $f['name'] }} @if ($sim[$id]['usouMinima']) ({{ __('minimum fare applied') }}) @endif R$ {{ number_format($sim[$id]['total'], 2, ',', '.') }} R$ {{ number_format($sim[$id]['motorista'], 2, ',', '.') }} R$ {{ number_format($sim[$id]['plataforma'], 2, ',', '.') }} R$ {{ number_format($sim[$id]['porKm'], 2, ',', '.') }}
{{-- ===== tarifas: SOMENTE LEITURA (fonte da verdade: Tipos de veículo) ===== --}}

⚙️ {{ __('Fares, photo, activation and creation of vehicle types are managed at') }} {{ __('Vehicle Types') }}. {{ __('This page only reads those values to simulate prices and to set the cancellation policy.') }}

@foreach ($fares as $id => $f) @endforeach
{{ __('Vehicle type') }} {{ __('Base fare') }} {{ __('Per km') }} {{ __('Per minute') }} {{ __('Minimum fare') }} {{ __('Active') }}
{{ $f['name'] }} R$ {{ number_format($f['base_fare'], 2, ',', '.') }} R$ {{ number_format($f['distance_fare'], 2, ',', '.') }} R$ {{ number_format($f['time_fare'], 2, ',', '.') }} R$ {{ number_format($f['min_fare'], 2, ',', '.') }} {{ $f['is_active'] ? __('Yes') : __('No') }}
{{-- ===== política de cancelamento ===== --}}

{{ __('Cancellation policy') }}



  • {{ __('Nobody accepted, customer cancels before accept, or within the window') }} → {{ __('full refund') }}
  • {{ __('Driver cancels, does not show up or takes too long') }} → {{ __('full refund') }}
  • {{ __('Customer cancels after the window') }} → {{ __('refund minus the fee') }}
  • {{ __('Refunds go back to the original payment method; the split to the driver is cancelled automatically.') }}

{{-- ===== análise de cancelamentos ===== --}}

{{ __('Cancellations (last 30 days)') }}

{{ __('Rides') }}

{{ $totalCorridas }}

{{ __('Cancellations') }}

{{ $totalCancel }}

{{ __('Cancellation rate') }}

{{ $taxaCancel }}%

{{ __('Refunded') }}

R$ {{ number_format($devolvido, 2, ',', '.') }}

{{ __('Fees kept') }}

R$ {{ number_format($retido, 2, ',', '.') }}

{{ __('Who cancelled') }}

@forelse ($porQuem as $quem => $qtd)

· {{ __(ucfirst($quem)) }}: {{ $qtd }}

@empty

{{ __('No data yet') }}

@endforelse

{{ __('Stage') }}

@foreach ($porEtapa as $et => $qtd)

· {{ __($et) }}: {{ $qtd }}

@endforeach

{{ __('Top reasons — customer') }}

@forelse ($motivosCliente as $m => $q)

· {{ $m }} — {{ $q }}

@empty

{{ __('No data yet') }}

@endforelse

{{ __('Top reasons — driver') }}

@forelse ($motivosMotorista as $m => $q)

· {{ $m }} — {{ $q }}

@empty

{{ __('No data yet') }}

@endforelse

{{ __('Drivers who cancel the most') }}

@forelse ($topMotoristas as $t)

· {{ $nomes[$t->driver_id] ?? ('#' . $t->driver_id) }} — {{ $t->total }}

@empty

{{ __('No data yet') }}

@endforelse

{{ __('Customers who cancel the most') }}

@forelse ($topClientes as $t)

· {{ $nomes[$t->customer_id] ?? ('#' . $t->customer_id) }} — {{ $t->total }}

@empty

{{ __('No data yet') }}

@endforelse