@extends(\Auth::user()->role != 10 ? 'layout' : 'layoutfrontdesk') @section('title', 'Daily Revenue Report') @section('css') @endsection @section('content')
@if (checkBackDateHotel(hotelID()))
There are backdated bookings from OTA or Manual; please check in first, and then don't forget to update DRR according to the date in the details.
@endif
{{--

Daily Revenue Report

--}}

@csrf {{-- Report Date : {{ date('d-m-y', strtotime($date_now)) }} --}} @if (\Auth::user()->role == 1) @endif

@include('report.daily_revenue')
{{-- Room sales --}} {{--

Room Sales

@php $jml_room_day = $jml_rvnu_day = 0; $jml_room_mon = $jml_rvnu_mon = 0; $jml_room_yer = $jml_rvnu_yer = 0; @endphp @foreach($segments as $k => $segment) @php $jml_room_day += @$segment->room; $jml_rvnu_day += @$segment->revenue; $jml_room_mon += @$segment->room_mtd; $jml_rvnu_mon += @$segment->revenue_mtd; $jml_room_yer += @$segment->room_ytd; $jml_rvnu_yer += @$segment->revenue_ytd; @endphp @endforeach
No MARKET SEGMENT TODAY MONTH TO DATE YEAR TO DATE
ROOMS REVENUE ROOMS REVENUE ROOMS REVENUE
{{$loop->iteration}} {{ config('custom.segment_ratecodes.'.$segment->segment_id) }} {{ @$segment->room ? ribuan($segment->room) : '-' }} {{ @$segment->revenue ? ribuan($segment->revenue) : '-' }} {{ @$segment->room_mtd ? ribuan($segment->room_mtd) : '-' }} {{ @$segment->revenue_mtd ? ribuan($segment->revenue_mtd) : '-'}} {{ @$segment->room_ytd ? ribuan($segment->room_ytd) : '-' }} {{ @$segment->revenue_ytd ? ribuan($segment->revenue_ytd) : '-'}}

TOTAL ROOM SALES

{{ ribuan($jml_room_day) }} {{ ribuan($jml_rvnu_day) }} {{ ribuan($jml_room_mon) }} {{ ribuan($jml_rvnu_mon) }} {{ ribuan($jml_room_yer) }} {{ ribuan($jml_rvnu_yer) }}
--}} {{-- Room statistic --}} {{--

Room Statistic

@foreach($room_statistics as $room_stat) @if($room_stat->statistic_id>0) @php if($room_stat->statistic_id==1) { //room available $room_mtd = $room_stat->mtd; $room_bud = $room_stat->budget_mtd; $room_var = $room_stat->variance_mtd; $room_ytd = $room_stat->ytd; } elseif($room_stat->statistic_id==3) { //compliment $comp_mtd = $room_stat->mtd; $comp_bud = $room_stat->budget_mtd; $comp_var = $room_stat->variance_mtd; $comp_ytd = $room_stat->ytd; } elseif($room_stat->statistic_id==7) { //room occupied $occu_mtd = $room_stat->mtd; $occu_bud = $room_stat->budget_mtd; $occu_var = $room_stat->variance_mtd; $occu_ytd = $room_stat->ytd; } @endphp @if($room_stat->statistic_id==9) @php $mtd = $room_mtd>0 ? (($occu_mtd/$room_mtd)*100) : 0; $bud = $room_bud>0 ? (($occu_bud/$room_bud)*100) : 0; $var = $room_var>0 ? (($occu_var/$room_var)*100) : 0; $ytd = $room_ytd>0 ? (($occu_ytd/$room_ytd)*100) : 0; @endphp @elseif($room_stat->statistic_id==10) @php $mtd = $room_mtd>0 ? ((($occu_mtd-$comp_mtd)/$room_mtd)*100) : 0; $bud = $room_bud>0 ? ((($occu_bud-$comp_bud)/$room_bud)*100) : 0; $var = $room_var>0 ? ((($occu_var-$comp_var)/$room_var)*100) : 0; $ytd = $room_ytd>0 ? ((($occu_ytd-$comp_ytd)/$room_ytd)*100) : 0; @endphp @else @endif @else @php if($room_stat->statistic_id==1) { //room available $room_mtd = $room_stat->mtd; $room_bud = $room_stat->budget_mtd; $room_var = $room_stat->variance_mtd; $room_ytd = $room_stat->ytd; } elseif($room_stat->statistic_id==3) { //compliment $comp_mtd = $room_stat->mtd; $comp_bud = $room_stat->budget_mtd; $comp_var = $room_stat->variance_mtd; $comp_ytd = $room_stat->ytd; } elseif($room_stat->statistic_id==7) { //room occupied $occu_mtd = $room_stat->mtd; $occu_bud = $room_stat->budget_mtd; $occu_var = $room_stat->variance_mtd; $occu_ytd = $room_stat->ytd; } $lodging_day = $room_stat->today; $lodging_bdy = $room_stat->budget; $lodging_vdy = $room_stat->variance; $lodging_mtd = $room_stat->mtd; $lodging_bud = $room_stat->budget_mtd; $lodging_var = $room_stat->variance_mtd; $lodging_ytd = $room_stat->ytd; @endphp @endif @endforeach
no ROOM STATISTIC TODAY MONTH TO DATE YTD
TODAY BUDGET VARIANCE MTD BUDGET VARIANCE
{{ $loop->iteration }} {{ config('custom.room_statistic.'.$room_stat->statistic_id) }}{{ number_format($room_stat->today, 2, ".", ",") }}% {{ number_format($room_stat->budget, 2, ".", ",") }}% {{ number_format($room_stat->variance, 2, ".", ",") }}% {{ number_format($mtd, 2, ".", ",") }}% {{ number_format($bud, 2, ".", ",") }}% {{ number_format($var, 2, ".", ",") }}% {{ number_format($ytd, 2, ".", ",") }}%{{ number_format($room_stat->today, 2, ".", ",") }}% {{ number_format($room_stat->budget, 2, ".", ",") }}% {{ number_format($room_stat->variance, 2, ".", ",") }}% {{ number_format($mtd, 2, ".", ",") }}% {{ number_format($bud, 2, ".", ",") }}% {{ number_format($var, 2, ".", ",") }}% {{ number_format($ytd, 2, ".", ",") }}%{{ ribuan($room_stat->today) }} {{ ribuan($room_stat->budget) }} {{ ribuan($room_stat->variance) }} {{ ribuan($room_stat->mtd) }} {{ ribuan($room_stat->budget_mtd) }} {{ ribuan($room_stat->variance_mtd) }} {{ ribuan($room_stat->ytd) }}
--}} {{-- Detail --}} {{--

Description

@foreach($shop_statistics_room as $shop_room) @php $lodging_day += $shop_room->today; $lodging_bdy += $shop_room->budget; $lodging_vdy += $shop_room->variance; $lodging_mtd += $shop_room->mtd; $lodging_mtd += $shop_room->budget_mtd; $lodging_var += $shop_room->variance_mtd; $lodging_ytd += $shop_room->ytd; @endphp @endforeach @php $shopid = 0; $total_today=0; $total_budget_day=0; $total_variance_day=0; $total_mtd=0; $total_budget_mtd=0; $total_variance_mtd=0; $total_ytd=0; $shop_name=''; $gtotal_today=0; $gtotal_budget_day=0; $gtotal_variance_day=0; $gtotal_mtd=0; $gtotal_budget_mtd=0; $gtotal_variance_mtd=0; $gtotal_ytd=0; @endphp @foreach($shop_statistics as $shop_stat) @if($shopid != $shop_stat->shop_id && $shopid != 0) @php $gtotal_today += $total_today; $gtotal_budget_day += $total_budget_day; $gtotal_variance_day += $total_variance_day; $gtotal_mtd += $total_budget_mtd; $gtotal_budget_mtd += $total_budget_mtd; $gtotal_variance_mtd += $total_variance_mtd; $gtotal_ytd += $total_ytd; $total_today=0; $total_budget_day=0; $total_variance_day=0; $total_mtd=0; $total_budget_mtd=0; $total_variance_mtd=0; $total_ytd=0; @endphp @endif @if($shopid != $shop_stat->shop_id) @php $shopid = $shop_stat->shop_id; $shop_name = @$shop_stat->shop->nama; @endphp @endif @php $total_today += $shop_stat->today; $total_budget_day += $shop_stat->budget; $total_variance_day += $shop_stat->variance; $total_mtd += $shop_stat->mtd; $total_budget_mtd += $shop_stat->budget_mtd; $total_variance_mtd += $shop_stat->variance_mtd; $total_ytd += $shop_stat->ytd; @endphp @endforeach @php $gtotal_today += $total_today; $gtotal_budget_day += $total_budget_day; $gtotal_variance_day += $total_variance_day; $gtotal_mtd += $total_budget_mtd; $gtotal_budget_mtd += $total_budget_mtd; $gtotal_variance_mtd += $total_variance_mtd; $gtotal_ytd += $total_ytd; $gtotal_today += $lodging_day ?? 0; $gtotal_budget_day += $lodging_bdy ?? 0; $gtotal_variance_day += $lodging_vdy ?? 0; $gtotal_mtd += $lodging_mtd ?? 0; $gtotal_budget_mtd += $lodging_bud ?? 0; $gtotal_variance_mtd += $lodging_var ?? 0; $gtotal_ytd += $lodging_ytd ?? 0; @endphp
# DESCRIPTION TODAY MONTH TO DATE YTD
TODAY BUDGET VARIANCE MTD BUDGET VARIANCE
# Room Revenue
#     Lodging {{ ribuan(@$lodging_day) }} {{ ribuan(@$lodging_bdy) }} {{ ribuan(@$lodging_vdy) }} {{ ribuan(@$lodging_mtd) }} {{ ribuan(@$lodging_bud) }} {{ ribuan(@$lodging_var) }} {{ ribuan(@$lodging_ytd) }}
    @if($shop_room->tipe_menu_id>0) {{ @$shop_room->tipe->nama_tipe }} @elseif($shop_room->tipe_menu_id===0) Custom Menu @elseif(!$shop_room->tipe_menu_id) Discount @endif {{ ribuan($shop_room->today) }} {{ ribuan($shop_room->budget) }} {{ ribuan($shop_room->variance) }} {{ ribuan($shop_room->mtd) }} {{ ribuan($shop_room->budget_mtd) }} {{ ribuan($shop_room->variance_mtd) }} {{ ribuan($shop_room->ytd) }}
# TOTAL ROOM REVENUE {{ ribuan(@$lodging_day) }} {{ ribuan(@$lodging_bdy) }} {{ ribuan(@$lodging_vdy) }} {{ ribuan(@$lodging_mtd) }} {{ ribuan(@$lodging_bud) }} {{ ribuan(@$lodging_var) }} {{ ribuan(@$lodging_ytd) }}
# TOTAL {{ strtoupper($shop_name) }} REVENUE {{ ribuan($total_today) }} {{ ribuan($total_budget_day) }} {{ ribuan($total_variance_day) }} {{ ribuan($total_mtd) }} {{ ribuan($total_budget_mtd) }} {{ ribuan($total_variance_mtd) }} {{ ribuan($total_ytd) }}
# {{ @$shop_stat->shop->nama }}
#     @if($shop_stat->tipe_menu_id>0) {{ @$shop_stat->tipe->nama_tipe }} @elseif($shop_stat->tipe_menu_id===0) Custom Menu @elseif(!$shop_stat->tipe_menu_id) Discount @endif {{ ribuan($shop_stat->today) }} {{ ribuan($shop_stat->budget) }} {{ ribuan($shop_stat->variance) }} {{ ribuan($shop_stat->mtd) }} {{ ribuan($shop_stat->budget_mtd) }} {{ ribuan($shop_stat->variance_mtd) }} {{ ribuan($shop_stat->ytd) }}
# TOTAL {{ strtoupper($shop_name) }} REVENUE {{ ribuan($total_today) }} {{ ribuan($total_budget_day) }} {{ ribuan($total_variance_day) }} {{ ribuan($total_mtd) }} {{ ribuan($total_budget_mtd) }} {{ ribuan($total_variance_mtd) }} {{ ribuan($total_ytd) }}
# TOTAL NET REVENUE {{ ribuan($gtotal_today) }} {{ ribuan($gtotal_budget_day) }} {{ ribuan($gtotal_variance_day) }} {{ ribuan($gtotal_mtd) }} {{ ribuan($gtotal_budget_mtd) }} {{ ribuan($gtotal_variance_mtd) }} {{ ribuan($gtotal_ytd) }}
--}}
@endsection @section('js') @endsection