@if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @php $no = 1; @endphp {{-- @if (count($guest_segments) > 0) --}} @foreach(config('custom.segment_ratecodes') as $key_segmentation => $segmentation) @php // Guest Segment // today $guest_segments[$key_segmentation]['room'] = $guest_segments[$key_segmentation]['room'] ?? 0; $guest_segments[$key_segmentation]['pax'] = $guest_segments[$key_segmentation]['pax'] ?? 0; $guest_segments[$key_segmentation]['room_revenue'] = $guest_segments[$key_segmentation]['room_revenue'] ?? 0; $guest_segments[$key_segmentation]['percent'] = 0; $guest_segments[$key_segmentation]['average_rate'] = 0; if ($guest_segments[$key_segmentation]['room'] > 0) { $guest_segments[$key_segmentation]['percent'] = $guest_segments[$key_segmentation]['room'] / $total_rev_room['room'] * 100; } if ($guest_segments[$key_segmentation]['room_revenue'] > 0) { $guest_segments[$key_segmentation]['average_rate'] = $guest_segments[$key_segmentation]['room_revenue'] / $guest_segments[$key_segmentation]['room']; } // MTD $guest_segments[$key_segmentation]['room_mtd'] = $guest_segments[$key_segmentation]['room_mtd'] ?? 0; $guest_segments[$key_segmentation]['pax_mtd'] = $guest_segments[$key_segmentation]['pax_mtd'] ?? 0; $guest_segments[$key_segmentation]['room_revenue_mtd'] = $guest_segments[$key_segmentation]['room_revenue_mtd'] ?? 0; $guest_segments[$key_segmentation]['percent_mtd'] = 0; $guest_segments[$key_segmentation]['average_rate_mtd'] = 0; if ($guest_segments[$key_segmentation]['room_mtd'] > 0) { $guest_segments[$key_segmentation]['percent_mtd'] = $guest_segments[$key_segmentation]['room_mtd'] / $total_rev_room['room_mtd'] * 100; } if ($guest_segments[$key_segmentation]['room_revenue_mtd'] > 0) { $guest_segments[$key_segmentation]['average_rate_mtd'] = $guest_segments[$key_segmentation]['room_revenue_mtd'] / $guest_segments[$key_segmentation]['room_mtd']; } // YTD $guest_segments[$key_segmentation]['room_ytd'] = $guest_segments[$key_segmentation]['room_ytd'] ?? 0; $guest_segments[$key_segmentation]['pax_ytd'] = $guest_segments[$key_segmentation]['pax_ytd'] ?? 0; $guest_segments[$key_segmentation]['room_revenue_ytd'] = $guest_segments[$key_segmentation]['room_revenue_ytd'] ?? 0; $guest_segments[$key_segmentation]['percent_ytd'] = 0; $guest_segments[$key_segmentation]['average_rate_ytd'] = 0; if ($guest_segments[$key_segmentation]['room_ytd'] > 0) { $guest_segments[$key_segmentation]['percent_ytd'] = $guest_segments[$key_segmentation]['room_ytd'] / $total_rev_room['room_ytd'] * 100; } if ($guest_segments[$key_segmentation]['room_revenue_ytd'] > 0) { $guest_segments[$key_segmentation]['average_rate_ytd'] = $guest_segments[$key_segmentation]['room_revenue_ytd'] / $guest_segments[$key_segmentation]['room_ytd']; } // Closed Guest Segment // Total Rev Room // Today if ($total_rev_room['room'] > 0) { $total_rev_room['percent'] = $total_rev_room['room'] / $total_rev_room['room'] * 100; } if ($total_rev_room['room_revenue'] > 0) { $total_rev_room['average_rate'] = $total_rev_room['room_revenue'] / $total_rev_room['room']; } // mtd if ($total_rev_room['room_mtd'] > 0) { $total_rev_room['percent_mtd'] = $total_rev_room['room_mtd'] / $total_rev_room['room_mtd'] * 100; } if ($total_rev_room['room_revenue_mtd'] > 0) { $total_rev_room['average_rate_mtd'] = $total_rev_room['room_revenue_mtd'] / $total_rev_room['room_mtd']; } // ytd if ($total_rev_room['room_ytd'] > 0) { $total_rev_room['percent_ytd'] = $total_rev_room['room_ytd'] / $total_rev_room['room_ytd'] * 100; } if ($total_rev_room['room_revenue_ytd'] > 0) { $total_rev_room['average_rate_ytd'] = $total_rev_room['room_revenue_ytd'] / $total_rev_room['room_ytd']; } // Closed Total Rev Room @endphp {{-- --}} @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @php $no++; @endphp @endforeach {{-- @else @endif --}} @if (count($guest_segments) > 0) @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif {{-- --}} @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @if (\Request::get('show_filter') == "mtd") @endif @if (\Request::get('show_filter') == "ytd") @endif @endif
No Guest Segment#Rm (%)MTD Total Room (%)YTD Total Room (%)PaxMTD Total PaxYTD Total PaxAverage-RateMTD AvrgRateYTD AvrgRateRoom LodgingMTD LodgingYTD Lodging
{{ $no }}{{ config('custom.segment_ratecodes.'.$key) }}{{ $segmentation }}{{ $guest_segments[$key_segmentation]['room'] }} {{ decimalWithDot($guest_segments[$key_segmentation]['percent'], 2) }}{{ $guest_segments[$key_segmentation]['room_mtd'] }} {{ decimalWithDot($guest_segments[$key_segmentation]['percent_mtd'], 2) }}{{ $guest_segments[$key_segmentation]['room_ytd'] }} {{ decimalWithDot($guest_segments[$key_segmentation]['percent_ytd'], 2) }}{{ $guest_segments[$key_segmentation]['pax'] }}{{ $guest_segments[$key_segmentation]['pax_mtd'] }}{{ $guest_segments[$key_segmentation]['pax_ytd'] }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['average_rate']) }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['average_rate_mtd']) }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['average_rate_ytd']) }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['room_revenue']) }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['room_revenue_mtd']) }}{{ ribuanDuaAngkaBelakangKoma($guest_segments[$key_segmentation]['room_revenue_ytd']) }}

No Data

Total Rev-Room{{ $total_rev_room['room'] }} {{ decimalWithDot($total_rev_room['percent'], 2) }}{{ $total_rev_room['room_mtd'] }} {{ decimalWithDot($total_rev_room['percent_mtd'], 2)}}{{ $total_rev_room['room_ytd'] }} {{ decimalWithDot($total_rev_room['percent_ytd'], 2)}}{{ $total_rev_room['pax'] }}{{ $total_rev_room['pax_mtd']}}{{ $total_rev_room['pax_ytd']}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['average_rate'])}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['average_rate_mtd'])}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['average_rate_ytd'])}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['room_revenue'])}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['room_revenue_mtd'])}}{{ ribuanDuaAngkaBelakangKoma($total_rev_room['room_revenue_ytd'])}}
Compliment Rooms
COMP{{ $total_complimentary['room'] }} {{ $total_complimentary['room_mtd'] }} {{ $total_complimentary['room_ytd'] }} {{ $total_complimentary['pax'] }}{{ $total_complimentary['pax_mtd'] }}{{ $total_complimentary['pax_ytd'] }}