{!! Form::open(['url' => action('CheckoutController@store'), 'method' => 'post', 'id' => 'add_form' ]) !!}
@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(isset($room) )
Room Details
Room No. |
Date |
Room Rent Details |
@foreach($room as $sin_room)
{{ $sin_room->room_no ?? '' }}
{{ $sin_room->room_type ?? '' }}
|
{{ $booking->check_in_at ?? '' }}
{{ $booking->check_out_at ?? '' }}
Adults : {{ $sin_room->adults ?? '' }}
Children : {{ $sin_room->children ?? '' }}
|
@php
$startTimeStamp = strtotime($booking->check_in_at);
$endTimeStamp = strtotime($booking->check_out_at);
$hour = request()->session()->get('business.day_duration') ?? 24;
$time = $hour * 60 * 60;
$timeDiff = abs($endTimeStamp - $startTimeStamp);
$numberDays = $timeDiff/$time;
$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 |
{{ $booking->check_in_at ?? '' }} |
{{ $booking->check_out_at ?? '' }} |
{{$no_of_days}} |
{{ $sin_room->rent}} |
{{ $total_rent }} |
{{ $discount }} |
{{ $total_rent - $discount }} |
{{ $total_rent - $discount }} |
|
@endforeach
@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;
$time = $hour * 60 * 60;
$numberDays = $timeDiff/$time;
$discount = 0;
$no_of_days = round($numberDays) < $numberDays ? round($numberDays) + 1 : round($numberDays);
$total_rent = $room->sum('rent');
$total_bed = $room->sum('bed_amount');
$total_person = $room->sum('person_amount');
$total_child = $room->sum('child_amount');
$total_add = $total_bed + $total_person + $total_child;
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();
$com_rate = App\Models\Complementary::whereIn('id', $comIds)->sum('rate');
$complementary_amount = $room->sum('number');
$complementary = $com_rate * $complementary_amount;
@endphp
Billing Details
Room Rent Amt. |
{{ $total_rent > 0 ? number_format($total_rent, 2) : '0.00' }} |
Discount Amt. |
{{ $discount > 0 ? number_format($discount, 2) : '0.00' }} |
Total Room Rent Amt. |
{{ $total_payable_aft_dis > 0 ? number_format($total_payable_aft_dis, 2) : '0.00' }} |
Complementary Amt. |
{{ $complementary > 0 ? number_format($complementary, 2) : '0.00' }} |
Bed/Person Charges. |
{{ $total_add > 0 ? number_format($total_add, 2) : '0.00' }} |
Room Expense. |
{{ $expenses->sum('final_total') > 0 ? number_format($expenses->sum('final_total'), 2) : '0.00' }} |
Advance Amt. |
{{ $advance > 0 ? number_format($advance, 2) : '0.00'}} |
Payable Rent Amt. |
{{ number_format($total_payable_aft_dis + $complementary + $expenses->sum('final_total') + $total_add - $advance, 2)}} |
Additional Charges
{!! Form::label('additional_charge', __('Addititional Charge') . ':*') !!}
{!! Form::number('additional_charge', null, ['class' => 'form-input', 'id' => 'additional_charge_input'
]); !!}
{!! Form::label('additional_note', __('Addititional Comment') . ':*') !!}
{!! Form::text('additional_note', null, ['class' => 'form-input',
]); !!}
Payable Amt. |
{{ number_format($total_payable_aft_dis + $complementary + $expenses->sum('final_total') + $total_add - $advance, 2)}} |
Room Posted Bill
@if($expenses->count() > 0)
@endif
Bill Type |
Qty. |
Total |
Date |
@foreach($expenses as $expense)
{{$expense->category->name ?? ''}} |
{{$expense->quantity ?? 0}} |
{{$expense->final_total > 0 ? number_format($expense->final_total, 2) : '0.00'}} |
{{$expense->created_at}} |
@endforeach
@endif
Billing Details
@foreach($payment_lines as $payment_line)
@include('checkout.partials.payment_row', ['removable' => !$loop->first, 'row_index' => $loop->index, 'payment_line' => $payment_line])
@endforeach
{!! Form::close() !!}