@extends('layouts.app_rest') @section('content')
@if(isset($booking))

Customer Details

Name {{ $booking->customer->first_name.' '. $booking->customer->last_name}}
Email ID {{ $booking->customer->email }}
Mobile No {{ $booking->customer->contact_no }}
Address {{ $booking->customer->address }}
Nationality {{ $booking->customer->nationality }}

Booking Details

Checkin At {{ $booking->check_in_at}} Booking No {{ $booking->ref_no}}
Checkout At {{ $booking->check_out_at }} Purpose {{ $booking->purpose}}
Arival From {{ $booking->arival_from }}
Booking Type {{ $booking->type->name ?? ''}}
Booking Source {{ $booking->source ? $booking->source->name : '' }}
@endif @if($room->count() > 0 )

Room Details

@foreach($room as $sin_room) @endforeach
Room No. Date Room Rent Details
{{ $sin_room->room_no ?? '' }}
{{ $sin_room->room_type ?? '' }}
{{ $sin_room->check_in_at ?? '' }}
{{ $sin_room->check_out_at ?? '' }}

Adults : {{ $sin_room->adults ?? '' }}

Children : {{ $sin_room->children ?? '' }}
@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 = $sin_room->rent; if($booking->discount_type == 'percentage') { $discount = $booking->discount_amount/100 * $total_rent; } else { $discount = $booking->discount_amount; } @endphp
# From Date To Date No of Days Rend / Day Total Rent Rent Discount Amt. Aft Dis Total Amount
1 {{ $sin_room->check_in_at ?? '' }} {{ $sin_room->check_out_at ?? '' }} {{ $no_of_days}} {{ number_format($total_rent / $no_of_days, 2) }} {{ number_format($total_rent, 2) }} {{ number_format($discount,2) }} {{ number_format($total_rent - $discount, 2) }} {{ number_format($total_rent - $discount, 2) }}
@endif @if(isset($booking)) @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; $comIds = $room->pluck('complementry_id')->toArray(); $complementary = App\Models\Complementary::whereIn('id', $comIds)->sum('rate'); $complementary_amount = $room->sum('number'); @endphp

Billing Details

Total Room Rent Amt. {{ number_format($total_payable_aft_dis,2) }}
Advance Amt. {{ number_format($advance,2) }}
Payable Rent Amt. {{ number_format($total_payable_aft_dis - $advance, 2)}}
@endif
@endsection