Price
@php $total_price = 0; @endphp @if(isset(session()->get('temp-booking-points')['studio'][session()->get('temp-booking-studio-selection')])) @php $studio = session()->get('temp-booking-points')['studio'][session()->get('temp-booking-studio-selection')]; @endphp
Studio
@if(isset($studio['daily'])) @foreach($studio['daily'] as $daily) @php $total_price += $daily; @endphp
{{$daily}}pts x 1day
= {{$daily}} pts
@endforeach @endif @if(isset($studio['hourly'])) @foreach($studio['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; $total_price += $hourly_data[1]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@endforeach @endif
@endif @if(isset(session()->get('temp-booking-points')['equipment'][session()->get('temp-booking-equipment-selection')])) @php $equipment = session()->get('temp-booking-points')['equipment'][session()->get('temp-booking-equipment-selection')]; @endphp
Equipment
@if(isset($equipment['daily'])) @foreach($equipment['daily'] as $daily) @php $total_price += $daily; @endphp
{{$daily}}pts x 1day
= {{$daily}} pts
@endforeach @endif @if(isset($equipment['hourly'])) @foreach($equipment['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; $total_price += $hourly_data[1]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@endforeach @endif
@endif @if(isset(session()->get('temp-booking-points')['resource'][session()->get('temp-booking-resource-selection')])) @php $resource = session()->get('temp-booking-points')['resource'][session()->get('temp-booking-resource-selection')]; @endphp
Resource
@if(isset($resource['daily'])) @foreach($resource['daily'] as $daily) @php $total_price += $daily; @endphp
{{$daily}}pts x 1day
= {{$daily}} pts
@endforeach @endif @if(isset($resource['hourly'])) @foreach($resource['hourly'] as $hr) @php $hourly_data = explode('|',$hr); $hourly_points = $hourly_data[1]/$hourly_data[0]; $total_price += $hourly_data[1]; @endphp
{{$hourly_points}}pts x {{$hourly_data[0]}}hours
= {{$hourly_data[1]}} pts
@endforeach @endif
@endif
Total
{{(int)$total_price}} pts
Points left
{{(session()->get('point_balance') - (int)$total_price)}} pts