@extends('layouts.master_backend') @section('content') @php $userRole = Auth::user()->role_id; $settings = getSettings(); $calculatedAmount = calcFinalAmount($data_row, 1); $gstPerc = $calculatedAmount['totalRoomGstPerc']; $cgstPerc = $calculatedAmount['totalRoomCGstPerc']; $roomAmountGst = $calculatedAmount['totalRoomAmountGst']; $roomAmountCGst = $calculatedAmount['totalRoomAmountCGst']; $totalRoomAmount = $calculatedAmount['subtotalRoomAmount']; $advancePayment = $calculatedAmount['advancePayment']; $roomAmountDiscount = $calculatedAmount['totalRoomAmountDiscount']; $finalRoomAmount = $calculatedAmount['finalRoomAmount']; $gstPercFood = $calculatedAmount['totalOrderGstPerc']; $cgstPercFood = $calculatedAmount['totalOrderCGstPerc']; $foodAmountGst = $calculatedAmount['totalOrderAmountGst']; $foodAmountCGst = $calculatedAmount['totalOrderAmountCGst']; $foodOrderAmountDiscount = $calculatedAmount['totalOrderAmountDiscount']; $gstFoodApply = $calculatedAmount['gstFoodApply']; $totalOrdersAmount = $calculatedAmount['subtotalOrderAmount']; $finalOrderAmount = $calculatedAmount['finalOrderAmount']; $additionalAmount = $calculatedAmount['additionalAmount']; $additionalAmountReason = $data_row->additional_amount_reason; $finalAmount = $finalRoomAmount+$finalOrderAmount+$additionalAmount; @endphp
{{ Form::model($data_row,array('url'=>route('check-out'),'id'=>"check-out-form", 'class'=>"form-horizontal form-label-left",'files'=>true,'autocomplete'=>"off")) }} {{Form::hidden('id',null)}}

{{lang_trans('heading_guest_type')}}

{{lang_trans('txt_fullname')}} {{$data_row->customer->name}} {{lang_trans('txt_father_name')}} {{$data_row->customer->father_name}}
{{lang_trans('txt_email')}} {{$data_row->customer->email}} {{lang_trans('txt_mobile_num')}} {{$data_row->customer->mobile}}
{{lang_trans('txt_address')}} {{$data_row->customer->address}}, {{$data_row->customer->city}}, {{$data_row->customer->state}}, {{$data_row->customer->country}}

{{lang_trans('heading_checkin_info')}}

{{Form::text('check_in_date',$data_row->check_in,['class'=>"form-control col-md-6 col-xs-12", "id"=>"check_in_date", "placeholder"=>lang_trans('ph_date'),'readonly'=>true,'disabled'=>true])}}
{{Form::text('check_out_date', addSubDate('+', $data_row->duration_of_stay, $data_row->check_in, 'Y-m-d H:i:s') ,['class'=>"form-control col-md-6 col-xs-12", "id"=>"check_out_date", "placeholder"=>lang_trans('ph_date'),'required'=>true,'autocomplete'=>false, "readonly"=>true])}}
{{Form::number('duration_of_stay',null,['class'=>"form-control col-md-6 col-xs-12", "id"=>"duration_of_stay", "placeholder"=>lang_trans('ph_day_night'),"min"=>1,'required'=>true, 'readonly'=>true])}}
{{Form::number('remark_amount',null,['class'=>"form-control col-md-6 col-xs-12", "id"=>"Remark Amount","placeholder"=>lang_trans('ph_enter').lang_trans('txt_remark_amount'),"min"=>0])}}
{{Form::textarea('remark',null,['class'=>"form-control col-md-6 col-xs-12", "id"=>"remark", "placeholder"=>lang_trans('ph_enter').lang_trans('txt_remark'),"rows"=>1])}}

{{lang_trans('heading_idcard_info')}}

{{ Form::select('idcard_type',getDynamicDropdownList('type_of_ids'),null,['class'=>'form-control col-md-6 col-xs-12','placeholder'=>lang_trans('ph_select')]) }}
{{Form::text('idcard_no',null,['class'=>"form-control col-md-6 col-xs-12", "id"=>"idcard_no", "placeholder"=>lang_trans('ph_enter').lang_trans('txt_id_number')])}}
{{Form::file('id_image[]',['class'=>"form-control",'id'=>'idcard_image','multiple'=>true])}}
@if($data_row->id_cards->count())

@if($data_row->id_cards) @foreach($data_row->id_cards as $k=>$val) @if($val->file!='') @endif @endforeach @else @endif
{{lang_trans('txt_uploaded_files')}}
{{lang_trans('txt_sno')}}. {{lang_trans('txt_action')}}
{{$k+1}}
{{lang_trans('txt_no_file')}}
@endif

{{lang_trans('heading_payment_info')}}

@if($data_row->booked_rooms) @foreach($data_row->booked_rooms as $key=>$roomInfo) @php $checkIn = dateConvert($roomInfo->check_in, 'Y-m-d'); $checkOut = dateConvert($roomInfo->check_out, 'Y-m-d'); $durOfStayPerRoom = dateDiff($checkIn, $checkOut, 'days'); $durOfStayPerRoom = ($durOfStayPerRoom == 0) ? 1: $durOfStayPerRoom; $amountPerRoom = ($durOfStayPerRoom * $roomInfo->room_price); @endphp @endforeach @endif
{{lang_trans('txt_sno')}}. {{lang_trans('txt_room')}} {{lang_trans('txt_swapped_room')}} {{lang_trans('txt_duration_of_stay')}} {{lang_trans('txt_base_price')}} {{lang_trans('txt_total_amount')}}
{{$key+1}} {{ ($roomInfo->room_type) ? $roomInfo->room_type->title : ""}}
({{lang_trans('txt_room_num')}} : {{$roomInfo->room->room_no}})
{{ config('constants.YES_NO')[($roomInfo->swapped_from_room)?1:0] }} {{$durOfStayPerRoom}} {{Form::number('amount[per_room_price]',$roomInfo->room_price,['class'=>'form-control per_room_price', 'min'=>$roomInfo->room_price])}} {{getCurrencySymbol()}} {{ $amountPerRoom }}
{{-- --}}
{{lang_trans('txt_subtotal')}} {{Form::hidden('amount[total_room_amount]',$totalRoomAmount,['id'=>'total_room_amount'])}} {{getCurrencySymbol()}} {{ $totalRoomAmount }}
{{lang_trans('txt_sgst')}} ({{$gstPerc}}%) {{Form::hidden('amount[total_room_amount_gst]',null,['id'=>'total_room_amount_gst'])}} {{getCurrencySymbol()}} {{ $roomAmountGst }}
{{lang_trans('txt_cgst')}} ({{$cgstPerc}}%) {{Form::hidden('amount[total_room_amount_cgst]',null,['id'=>'total_room_amount_cgst'])}} {{getCurrencySymbol()}} {{ $roomAmountCGst }}
{{lang_trans('txt_advance_amount')}} {{Form::hidden('amount[total_room_advance_amount]',$advancePayment)}} {{getCurrencySymbol()}} {{ $advancePayment }}
{{lang_trans('txt_discount')}}
{{Form::number('discount_amount',$roomAmountDiscount,['class'=>"form-control", "id"=>"discount", "placeholder"=>lang_trans('ph_any_discount'),"min"=>0])}}
{{ Form::select('room_discount_in',config('constants.DISCOUNT_TYPES'),'amt',['class'=>'form-control', "id"=>"room_discount_in"]) }}
{{lang_trans('txt_total_amount')}} {{Form::hidden('amount[total_room_final_amount]',null,['id'=>'total_room_final_amount'])}} {{getCurrencySymbol()}} {{ $finalRoomAmount }}

{{lang_trans('txt_food_orders')}}

@forelse($data_row->orders_items as $k=>$val) @if(count($data_row->orders_items) == ($k+1) ) @endif @empty @endforelse
{{lang_trans('txt_sno')}}. {{lang_trans('txt_item_details')}} {{lang_trans('txt_date')}} {{lang_trans('txt_item_qty')}} {{lang_trans('txt_item_price')}} {{lang_trans('txt_total_amount')}}
{{$k+1}} {{$val->item_name}} {{dateConvert($val->created_at,'d-m-Y')}} {{$val->item_qty}} {{getCurrencySymbol()}} {{$val->item_price}} {{getCurrencySymbol()}} {{$val->item_qty*$val->item_price}}
{{lang_trans('txt_gst_apply')}} {{ Form::checkbox('food_gst_apply',$gstFoodApply,($gstFoodApply==1) ? true : false,['id'=>'apply_gst']) }}
{{lang_trans('txt_no_orders')}}
{{-- --}}
{{lang_trans('txt_subtotal')}} {{Form::hidden('amount[order_amount]',$totalOrdersAmount,['id'=>'total_order_amount'])}} {{getCurrencySymbol()}} {{ $totalOrdersAmount }}
{{lang_trans('txt_sgst')}} ({{$gstPercFood}}%) {{Form::hidden('amount[order_amount_gst]',$foodAmountGst,['id'=>'total_order_amount_gst'])}} {{getCurrencySymbol()}} {{$foodAmountGst}}
{{lang_trans('txt_cgst')}} ({{$cgstPercFood}}%) {{Form::hidden('amount[order_amount_cgst]',$foodAmountCGst,['id'=>'total_order_amount_cgst'])}} {{getCurrencySymbol()}} {{$foodAmountCGst}}
{{lang_trans('txt_discount')}}
{{Form::number('discount_order_amount',$foodOrderAmountDiscount,['class'=>"form-control col-md-7 col-xs-12", "id"=>"order_discount", "placeholder"=>lang_trans('ph_any_discount'),"min"=>0])}}
{{ Form::select('order_discount_in',config('constants.DISCOUNT_TYPES'),'amt',['class'=>'form-control', "id"=>"order_discount_in"]) }}
{{lang_trans('txt_total_amount')}} {{Form::hidden('amount[order_final_amount]',null,['id'=>'total_order_final_amount'])}} {{getCurrencySymbol()}} {{ $finalOrderAmount }}
{{Form::text('additional_amount_reason',$additionalAmountReason,['class'=>"form-control col-md-7 col-xs-12", "id"=>"additional_amount_reason", "placeholder"=>lang_trans('txt_additional_amount_reason')])}} {{Form::number('additional_amount',$additionalAmount,['class'=>"form-control col-md-7 col-xs-12", "id"=>"additional_amount", "placeholder"=>lang_trans('txt_additional_amount'),"min"=>0])}}
{{lang_trans('txt_grand_total')}} {{Form::hidden('amount[total_final_amount]',null,['id'=>'total_final_amount'])}} {{getCurrencySymbol()}} {{ $finalAmount }}

{{lang_trans('heading_additional_info')}}

{{Form::radio('invoice_applicable',1,true,['class'=>"flat invoice_applicable", 'id'=>'yes_invoice'])}}
{{Form::radio('invoice_applicable',0,false,['class'=>"flat invoice_applicable", 'id'=>'no_invoice'])}}
{{Form::text('company_gst_num',null,['class'=>"form-control col-md-6 col-xs-12", "id"=>"company_gst_num", "placeholder"=>"Enter GST Number"])}}
{{Form::select('payment_status',config('constants.PAYMENT_STATUS'),null,['class'=>"form-control col-md-6 col-xs-12", "placeholder"=>"--Select"])}}
{{Form::select('payment_mode',config('constants.PAYMENT_MODES'),null,['class'=>"form-control col-md-6 col-xs-12", "placeholder"=>"--Select"])}}
{{ Form::close() }} {{-- require set php var in js var --}} @endsection