@php $chauffeur = $booking->chauffeur; $client = $booking->client; $curSymbols = ['EUR' => '€', 'USD' => '$', 'GBP' => '£', 'CHF' => 'CHF']; $cur = $booking->currency ?: 'EUR'; $sym = $curSymbols[$cur] ?? $cur; $money = function ($amount) use ($sym) { return number_format((float) $amount, 2, ',', ' ') . ' ' . $sym; }; $chauffeurName = $chauffeur?->company ?: (trim(($chauffeur?->first_name ?? '') . ' ' . ($chauffeur?->last_name ?? '')) ?: ($chauffeur?->name ?? config('app.name'))); $clientName = trim(($client->first_name ?? '') . ' ' . ($client->last_name ?? '')) ?: ($client->name ?? 'Client'); $issuedOn = $booking->paid_at ?? $booking->created_at; $rideLabel = $booking->range_label ?: __('chauffeur.booking_range'); // Adresse de l'émetteur pour le pied de page : celle du chauffeur ou // de sa société, pays en toutes lettres (« France » plutôt que « FR »). $chauffeurCountry = $chauffeur?->country; if ($chauffeurCountry && strlen($chauffeurCountry) === 2 && class_exists(\Locale::class)) { $chauffeurCountry = \Locale::getDisplayRegion('-' . $chauffeurCountry, app()->getLocale()) ?: $chauffeurCountry; } $chauffeurAddress = trim(implode(' ', array_filter([ $chauffeur?->address, $chauffeur?->postal_code, $chauffeur?->city, $chauffeurCountry, ]))); // Le montant encaissé est toujours celui payé par le client, donc // TTC : la TVA s'en déduit, elle ne s'y ajoute pas. $totalTtc = (float) $booking->amountDue(); // La facture de course porte toujours la TVA, au taux configuré. $vatRate = (float) config('billing.ride_vat_rate'); $totalHt = round($totalTtc / (1 + $vatRate), 2); $vatAmount = round($totalTtc - $totalHt, 2); @endphp
Logo
{{ __('messages.billing') }} • {{ __('messages.client_document') }}
{{ __('chauffeur.invoice_provider') }}
{{ $chauffeurName }}
@if(!empty($chauffeur?->address))
{{ $chauffeur->address }}
@endif @if(!empty($chauffeur?->postal_code) || !empty($chauffeur?->city))
{{ $chauffeur->postal_code ?? '' }} {{ $chauffeur->city ?? '' }} {{ $chauffeur->country ?? '' }}
@endif @if(!empty($chauffeur?->email))
{{ $chauffeur->email }}
@endif @if(!empty($chauffeur?->phone))
{{ $chauffeur->phone }}
@endif @if(!empty($chauffeur?->siret))
SIRET : {{ $chauffeur->siret }}
@endif @if(!empty($chauffeur?->vat_number))
TVA : {{ $chauffeur->vat_number }}
@endif
{{ __('messages.accounting_document') }}

{{ __('messages.invoice_invoice') }}

N° COURSE-{{ $booking->id }}
{{ __('messages.issued_on') }} {{ optional($issuedOn)->format('d.m.Y') }}
{{ __('messages.paid') }}
{{ __('messages.client') }}
{{ $clientName }}
@if(!empty($client->address)){{ $client->address }}
@endif @if(!empty($client->postal_code) || !empty($client->city)){{ $client->postal_code ?? '' }} {{ $client->city ?? '' }} {{ $client->country }}
@endif @if(!empty($client->email)){{ $client->email }}
@endif @if(!empty($booking->client_phone ?: $client->phone)){{ $booking->client_phone ?: $client->phone }}@endif
{{ __('chauffeur.invoice_ride_details') }}
{{ $rideLabel }}
{{ __('chauffeur.booking_pickup') }} {{ $booking->pickup_address }}
@if($booking->dropoff_address) {{ __('chauffeur.booking_dropoff') }} {{ $booking->dropoff_address }} @endif
{{ __('messages.regulation') }}
{{ __('messages.total_amount') }} {{ $money($booking->amountDue()) }}
{{ __('messages.statut_order_details') }} {{ __('messages.paid') }}
{{ __('messages.designation') }} {{ __('messages.quantity') }} {{ __('messages.unit_price') }} {{ __('messages.amount') }}
{{ __('chauffeur.invoice_ride_line') }} — {{ $rideLabel }}
{{ $booking->pickup_address }} @if($booking->dropoff_address) → {{ $booking->dropoff_address }} @endif @if($booking->estimated_km) · {{ number_format((float) $booking->estimated_km, 1, ',', ' ') }} km @endif
1 {{ $money($booking->amountDue()) }} {{ $money($booking->amountDue()) }}
{{ __('messages.note') }}
{{ __('messages.thanks_for_order') }}
{{ __('messages.invoice_to_reference') }} COURSE-{{ $booking->id }}.
{{ __('messages.vat') }} ({{ rtrim(rtrim(number_format($vatRate * 100, 1, ',', ' '), '0'), ',') }}%) {{ $money($vatAmount) }}
{{ __('messages.total_ttc') }} {{ $money($totalTtc) }}