@extends(\Auth::user()->role != 10 ? 'layout' : 'layoutfrontdesk') @section('title', 'Room Availability') @section('css') @endsection @section('content')

Availability Per Room Type

{{-- Load Kolom Bulan dan colspan sebanyak jumlah tanggal --}} @foreach($dates as $month => $date) @php $colspan_date = count($date); @endphp @endforeach {{-- Load Kolom Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach @foreach($jenis_kamars as $jenis_kamar) {{-- Load Stock Jenis Kamar Per Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @php //Hitung jumlah kamar tersisa di setiap jenis kamar (Jumlah Kamar dikurangi kamar digunakan) $ketersediaan = $jenis_kamar->kamars_count - ($stocks[$jenis_kamar->nama][$day] ?? 0); //Kurangi kamar tersisa dengan kamar yang out of order if(array_key_exists($jenis_kamar->nama, $ooo_schedule)){ $ketersediaan -= array_sum(@$ooo_schedule[$jenis_kamar->nama][$day]); $kamar_out_of_order[] = array_sum(@$ooo_schedule[$jenis_kamar->nama][$day]); // foreach($ooo_schedule[$jenis_kamar->nama] as $date => $jumlah_ooo){ // $ketersediaan -= array_sum($jumlah_ooo); // $kamar_out_of_order[] = array_sum($jumlah_ooo); // // if(strtotime($date) >= strtotime($day)){ // // } // } } @endphp @endforeach @endforeach @endforeach
{{$month}}
{{date('D', strtotime($day))}}
{{date('d', strtotime($day))}}
{{ucwords($jenis_kamar->nama)}} {{$ketersediaan}}

Forecast Occupancy

@if (count($kamars) > 0)
{{-- Load Kolom Bulan dan colspan sebanyak jumlah tanggal --}} @foreach($dates as $month => $date) @php $colspan_date = count($date); @endphp @endforeach {{-- Load Kolom Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Total Kamar --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Kamar Out Of Order Per Tanggal --}} @php $ooo_per_day = array(); @endphp {{-- Load Total Kamar --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Occupancy (jumlah) Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Occupancy (persen) Per Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Expected Arrival --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Expected Departure --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Stock Jenis Kamar Per Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach {{-- Load Stock Jenis Kamar Per Tanggal --}} @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach @foreach($dates as $month => $date) @foreach($date as $day) @endforeach @endforeach
Forecast {{$month}}
{{date('D', strtotime($day))}}
{{date('d', strtotime($day))}}
Total Room Inventory {{count($kamars)}}
Total Room @php $jumlah_ooo = 0; @endphp @if (@$ooo_global_schedule[$day]) @foreach(@$ooo_global_schedule[$day] as $key => $ooo) @php $jumlah_ooo += $ooo;@endphp @endforeach @endif {{count($kamars) - $jumlah_ooo}} @php $ooo_per_day[$day] = $jumlah_ooo; @endphp
Occupancy (Qty) {{$stock_globals[$day]}}
Occupancy (%) @php $occupancypersen = 0; // $occupancypersen = floor(($stock_globals[$day] / count($kamars)) * 100); $occupancypersen = ($stock_globals[$day] / count($kamars)) * 100; $occupancypersenkoma = number_format($occupancypersen, 1); @endphp {{ $occupancypersenkoma }}
Expected Arrival {{ $expected_arrival[$day] }}
Expected Departure {{ $expected_departure[$day] }}
Out Of Order {{$ooo_per_day[$day]}}
Remaining Room {{ count($kamars) - $stock_globals[$day] - $ooo_per_day[$day] }}
Total Guests {{ $totalguests[$day] }}
Total Revenue {{ @ribuanWithComma($total_revenue[$day]) }}
Average Roomrate {{ $stock_globals[$day] ? ($total_revenue[$day] ? ribuanWithComma(@$total_revenue[$day]/$stock_globals[$day]) : 0) : 0 }}
Extra Bed   @php $extrabed_inventori_today = $extrabed_current ? ($extrabed_current->menu ? $extrabed_current->menu->stock : 0) : 0; $extrabed_stock_today = $extrabed_inventori_today - $extrabeds[$day]; @endphp {{$extrabed_stock_today}}
@else
No Room Available
@endif
@php $datas['start_date'] = $start_date @endphp @component('house_count.index', $datas) @endcomponent
@endsection @section('js') @endsection