@extends('layouts.main') @section('title', 'Review Booking') @section('content')
Review your booking!
Details
Location
{{$location->location->location}}
Date
{{date('d M, Y', strtotime($booking_form['start_date']))}} {{date('g:i A',strtotime($booking_form['start_time']))}} - {{date('d M, Y', strtotime($booking_form['end_date']))}} {{date('g:i A',strtotime($booking_form['end_time']))}}
@php $total_cost = 0; @endphp @if(!empty($studio))
Type of studio
{{$studio->name}}
{!! $studio->landingPage->description !!}
@if(isset($booking_points['studio'][$studio->id]['daily'])) @foreach($booking_points['studio'][$studio->id]['daily'] as $daily)
{{$daily}}pts x 1day
= {{$daily}} pts
@php $total_cost += $daily; @endphp @endforeach @endif @if(isset($booking_points['studio'][$studio->id]['hourly'])) @foreach($booking_points['studio'][$studio->id]['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@php $total_cost += $hourly_data[1]; @endphp @endforeach @endif
@endif @if(!empty($equipment))
Equipment
{{$equipment->name}}
{!! $equipment->description !!}
@if(isset($booking_points['equipment'][$equipment->id]['daily'])) @foreach($booking_points['equipment'][$equipment->id]['daily'] as $daily)
{{$daily}}pts x 1day
= {{$daily}} pts
@php $total_cost += $daily; @endphp
@endforeach @endif @if(isset($booking_points['equipment'][$equipment->id]['hourly'])) @foreach($booking_points['equipment'][$equipment->id]['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@php $total_cost += $hourly_data[1]; @endphp
@endforeach @endif
@endif @if(!empty($resource))
Additional Support
{{$resource->fname}} {{$resource->lname}}
{!! $resource->description !!}
@if(isset($booking_points['resource'][$resource->id]['daily'])) @foreach($booking_points['resource'][$resource->id]['daily'] as $daily)
{{$daily}}pts x 1day
= {{$daily}} pts
@php $total_cost += $daily; @endphp
@endforeach @endif @if(isset($booking_points['resource'][$resource->id]['hourly'])) @foreach($booking_points['resource'][$resource->id]['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@php $total_cost += $hourly_data[1]; @endphp @endforeach @endif
@endif @php $guest_amount = 0; @endphp @if(session()->has('guests'))
Additional Guest
@foreach(session()->get('guests') as $guest)
{{$guest['fname']}} {{$guest['lname']}} ({{$guest['email']}})
@if(($loop->index +1) > session()->get('free_guest'))
Guest Fee
= {{session()->get('additional_guest_points')}} pts
@php $guest_amount += session()->get('additional_guest_points'); @endphp @else
Free Guest
= 0 pts
@endif
@endforeach @endif
Add Guest
Booking cost
{{(int)$total_cost + (int)$guest_amount}} pts
@endsection