@php $bussiness = App\Models\Business::first(); @endphp

{{ isset($bussiness) && isset($bussiness->name) ? $bussiness->name : 'Pearl Island' }}

@if(isset($bussiness)) @if(isset($bussiness->address)) {{$bussiness->address}} @endif @if(isset($bussiness->address_two)) , {{$bussiness->address_two}}
@endif @if(isset($bussiness->city)) {{$bussiness->city}}
@endif @if(isset($bussiness->country)) {{$bussiness->country}}
@endif @if(isset($bussiness->mobile)) {{$bussiness->mobile}} @endif @if(isset($bussiness->phone)) ,{{$bussiness->phone}} @endif @endif

@php $startTimeStamp = strtotime($booking->check_in_at); $endTimeStamp = strtotime($booking->check_out_at); $timeDiff = abs($endTimeStamp - $startTimeStamp); $hour = request()->session()->get('business.day_duration') ?? 24; $numberDays = $timeDiff/($hour * 60 * 60); $discount = 0; $no_of_days = round($numberDays) < $numberDays ? round($numberDays) + 1 : round($numberDays); $total_rent = $room->sum('rent'); if($booking->discount_type == 'percentage') { $discount = $booking->discount_amount/100 * $total_rent; } else { $discount = $booking->discount_amount; } $total_payable_aft_dis = $total_rent - $discount + $booking->servise_charge; @endphp

Ref No : {{ $booking->ref_no ?? '' }}
Booking Date : {{ $booking->created_at ?? '' }}
Customer : {{$booking->customer->name ?? '' }}
Address : {{$booking->customer->address ?? '' }}
Email : {{$booking->customer->email ?? '' }}
Phone : {{$booking->customer->contact_no ?? '' }}

Checkin At : {{ $booking->check_in_at ?? '' }}
Checkout At : {{ $booking->check_out_at ?? '' }}
Room No : {!! $result !!}
Status : BOOKING
No of Rooms : {{$room->count()}}
Days : {{$no_of_days}}

@foreach($room as $key => $single_room) @php $total = $single_room->rent + $single_room->bed_amount + $single_room->person_amount + $single_room->child_amount ; $complementary = App\Models\Complementary::where('id', $single_room->complementry_id)->sum('rate'); $complementary_amount = $complementary * $single_room->number; @endphp @endforeach
No Date Amount
{{$key + 1}} {{ date('Y-m-d', strtotime($single_room->created_at)) }} {{number_format($total + $complementary, 2)}}


Total Amt. {{ number_format($total_rent,2) }}
Advance Amt. {{ number_format($advance,2) }}
Payable. {{ number_format($total_rent-$advance ,2) }}