@extends('layouts.app') @section('title', 'Tarifs & Pricing') @push('styles') @endpush @section('content')
💰 Tarifs & Pricing
{{ number_format($myAvgEarning, 2) }}€
Gain moyen/livraison
{{ number_format($myAvgDistance, 1) }} km
Distance moyenne
@php $ratio = $myAvgDistance > 0 ? $myAvgEarning / $myAvgDistance : 0; @endphp
{{ number_format($ratio, 2) }}€
Par km
📋 Grille tarifaire
🏁 Base fixe
{{ number_format($tarifs['base_fee'], 2) }}€
📍 Récupération/km
{{ number_format($tarifs['pickup_per_km'], 2) }}€
🏠 Livraison/km
{{ number_format($tarifs['dropoff_per_km'], 2) }}€
⬇️ Gain minimum
{{ number_format($tarifs['min_earning'], 2) }}€
⬆️ Gain maximum
{{ number_format($tarifs['max_earning'], 2) }}€
🏛️ Commission plateforme
{{ ($tarifs['platform_fee'] * 100) }}%
🔢 Simulateur de gains
@foreach($simulations as $sim)
{{ $sim['km'] }} km
{{ number_format($sim['earning'], 2) }}€
@endforeach
🧮 Calcul personnalisé
0.00€
⚡ Surge Pricing
@php $surge = $tarifs['surge'] ?? []; @endphp @if(!empty($surge) && ($surge['enabled'] ?? false))
🕐
Heures de pointe
@if(isset($surge['peak_hours']) && is_array($surge['peak_hours'])) @foreach($surge['peak_hours'] as $ph) {{ $ph['start'] ?? '?' }}h-{{ $ph['end'] ?? '?' }}h (x{{ $ph['multiplier'] ?? '1.0' }}){{ !$loop->last ? ', ' : '' }} @endforeach @else 11h-14h, 18h-21h @endif
x{{ collect($surge['peak_hours'] ?? [])->max('multiplier') ?? '1.3' }}
🌧️
Intempéries
Pluie x{{ $surge['weather']['rain'] ?? '1.15' }}, Forte pluie x{{ $surge['weather']['heavy_rain'] ?? '1.30' }}, Neige x{{ $surge['weather']['snow'] ?? '1.50' }}
x{{ max($surge['weather'] ?? [1.4]) }}
📈
Forte demande
Quand les commandes dépassent les livreurs
x{{ max($surge['demand'] ?? [1.5]) }}
@else
Pas de surge configuré
@endif
📦 Système Batch
@php $batch = $tarifs['batch'] ?? []; @endphp
📦 Max {{ $batch['max_orders'] ?? 3 }} commandes simultanées
📏 Rayon max {{ $batch['max_client_distance'] ?? 2 }} km entre clients
🏪 Rayon max {{ $batch['max_pickup_distance'] ?? 1.5 }} km entre restaurants
💰 Bonus: +{{ number_format($batch['bonus_per_extra_order'] ?? 1.50, 2) }}€ par commande supp.
⏱️ Fenêtre: {{ $batch['time_window'] ?? 10 }} min pour grouper
💡 Acceptez plusieurs commandes proches pour maximiser vos gains !
📐 Formule de calcul
Gain =
  Base ({{ number_format($tarifs['base_fee'], 2) }}€)
  + Récup × {{ number_format($tarifs['pickup_per_km'], 2) }}€/km
  + Livraison × {{ number_format($tarifs['dropoff_per_km'], 2) }}€/km
  × Surge (si actif)

Min: {{ number_format($tarifs['min_earning'], 2) }}€ — Max: {{ number_format($tarifs['max_earning'], 2) }}€
@endsection