@if (session('debug') == 'true')
debug mode
@endif
CCT
{{ Auth::user()->firstname }} {{ Auth::user()->name }} Déconnexion

Récapitulatif de la Réservation

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Nuitées sélectionnées
@foreach ($nights as $nightKey => $nightData)
@php // Extraire la partie date de la clé (ex: '2026-03-27-PC' -> '2026-03-27') $dateParts = explode('-', $nightKey); $actualDate = $dateParts[0] . '-' . $dateParts[1] . '-' . $dateParts[2]; $pensionType = $nightData['pension']; @endphp {{ \Carbon\Carbon::parse($actualDate)->format('d/m/Y') }} {{ $pensionType == 'PC' ? 'Pension complète' : 'Demi-pension' }}
@endforeach
@foreach ($rooms as $index => $room)
Chambre {{ $index + 1 }} - {{ ucfirst($room['type']) }}
@php // Pour afficher les détails par nuit, nous devons itérer sur les nuitées sélectionnées. // La variable $nights contient les nuitées sélectionnées avec leurs types de pension. // Nous l'utiliserons pour déterminer le prix de base pour le tableau d'affichage. // Note : Le calcul réel du prix total est effectué dans le contrôleur. // Cette section est destinée à l'affichage détaillé. @endphp @foreach ($nights as $nightKey => $nightData)
@php $dateParts = explode('-', $nightKey); $actualDate = $dateParts[0] . '-' . $dateParts[1] . '-' . $dateParts[2]; $pensionType = $nightData['pension']; @endphp {{ \Carbon\Carbon::parse($actualDate)->format('d/m/Y') }}
@php $adultIndex = 0; @endphp @foreach ($room['occupants'] as $occupant) @php // Utiliser le type de pension de la nuitée actuelle pour déterminer le prix de base $base = $pensionType == 'PC' ? 145 : 120; $supplement = 0; $adultCount = collect($room['occupants']) ->where('category', 'adulte') ->count(); if ($occupant['category'] == 'adulte' && $adultCount == 1) { $supplement = 20; } $fullPrice = $base + $supplement; // Réduction enfant $childDiscount = 0; if ($occupant['category'] != 'adulte') { $rate = match ($occupant['category']) { 'enfant_0_1' => 1.0, 'enfant_2_5' => $adultCount >= 2 ? 1.0 : 0.3, 'enfant_6_11' => $adultCount >= 2 ? 0.5 : 0.3, }; $childDiscount = $base * $rate; } // Réduction 3ème/4ème adulte $adultDiscount = 0; if ($occupant['category'] == 'adulte') { $adultIndex++; if ($adultIndex > 2) { $adultDiscount = $fullPrice * 0.2; } } $priceAfterAll = $fullPrice - $childDiscount - $adultDiscount; // PEC $pec = 0; if ( $occupant['category'] == 'adulte' && !empty($occupant['is_member']) && $occupant['is_member'] ) { $pec = $base * 0.4; } @endphp @endforeach
Occupant Catégorie Prix base Suppl. single Réduc. enfant Réduc. adulte Prix Prise en charge CCT
{{ $occupant['firstname'] }} {{ $occupant['lastname'] }} @switch($occupant['category']) @case('adulte') Adulte @break @case('enfant_0_1') Enfant 0-1 an @break @case('enfant_2_5') Enfant 2-5 ans @break @case('enfant_6_11') Enfant 6-11 ans @break @endswitch {{ number_format($base, 3, ',', ' ') }} {{ $supplement ? number_format($supplement, 3, ',', ' ') : '-' }} {{ $childDiscount ? '-' . number_format($childDiscount, 3, ',', ' ') : '-' }} {{ $adultDiscount ? '-' . number_format($adultDiscount, 3, ',', ' ') : '-' }} {{ number_format($priceAfterAll, 3, ',', ' ') }} {{ $pec ? '-' . number_format($pec, 3, ',', ' ') : '-' }}
@endforeach
Total chambre : {{ number_format($room['price'], 3, ',', ' ') }} TND
@endforeach
Montant(s) à payer
@if ($discountCCT > 0) @endif @if ($totalSolde > 0) @endif
Total hébergement : {{ number_format($totalBase, 3, ',', ' ') }} TND
Réductions enfants/adultes : - {{ number_format($totalChildDiscount + $totalAdultDiscount, 3, ',', ' ') }} TND
Prise en charge CCT : - {{ number_format($discountCCT, 3, ',', ' ') }} TND
Solde dû à la CCT : + {{ number_format($totalSolde, 3, ',', ' ') }} TND
Montant total à payer : {{ number_format($total, 3, ',', ' ') }} TND
@csrf
Mode de paiement
@foreach ($paimentModes as $key => $paimentMode)
@endforeach