@php $serv_today = $serv_budget = $serv_variance = $serv_mtd = $serv_mtd_budget = $serv_mtd_variance = $serv_ytd = 0; $tax_today = $tax_budget = $tax_variance = $tax_mtd = $tax_mtd_budget = $tax_mtd_variance = $tax_ytd = 0; $lodging_day = $lodging_bdy = $lodging_vdy = $lodging_mtd = $lodging_bud = $lodging_var = $lodging_ytd = 0; @endphp @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 $segment) @if (in_array($segment->segment_id, ['10','11']) ) @continue @endif @php // if ($segment->segment_id == 4) { // $segment->revenue = $segment->revenue - $data_ota_total_tdy; // $segment->revenue_mtd = $segment->revenue_mtd - $data_ota_total_mtd; // $segment->revenue_ytd = $segment->revenue_ytd - $data_ota_total_ytd; // $segment->tax = $segment->tax - $data_ota_tax_tdy; // $segment->tax_mtd = $segment->tax_mtd - $data_ota_tax_mtd; // $segment->tax_ytd = $segment->tax_ytd - $data_ota_tax_ytd; // $segment->service = $segment->service - $data_ota_serv_tdy; // $segment->service_mtd = $segment->service_mtd - $data_ota_serv_mtd; // $segment->service_ytd = $segment->service_ytd - $data_ota_serv_ytd; // } @endphp @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; $serv_today += @$segment->service; $serv_mtd += @$segment->service_mtd; $serv_ytd += @$segment->service_ytd; $tax_today += @$segment->tax; $tax_mtd += @$segment->tax_mtd; $tax_ytd += @$segment->tax_ytd; @endphp @endforeach
MARKET SEGMENT TODAY MONTH TO DATE YEAR TO DATE
ROOMS REVENUE ROOMS REVENUE ROOMS REVENUE
{{ config('custom.segment_ratecodes.'.$segment->segment_id) }} {{ @$segment->room ? ($segment->room) : '-' }} {{ @$segment->revenue ? ($segment->revenue) : '-' }} {{ @$segment->room_mtd ? ($segment->room_mtd) : '-' }} {{ @$segment->revenue_mtd ? ($segment->revenue_mtd) : '-'}} {{ @$segment->room_ytd ? ($segment->room_ytd) : '-' }} {{ @$segment->revenue_ytd ? ($segment->revenue_ytd) : '-'}}
TOTAL ROOM SALES {{ ($jml_room_day) }} {{ ($jml_rvnu_day) }} {{ ($jml_room_mon) }} {{ ($jml_rvnu_mon) }} {{ ($jml_room_yer) }} {{ ($jml_rvnu_yer) }}

@php $jml_room_day_com = $jml_rvnu_day_com = 0; $jml_room_mon_com = $jml_rvnu_mon_com = 0; $jml_room_yer_com = $jml_rvnu_yer_com = 0; $serv_today_com = $serv_mtd_com = $serv_ytd_com = 0; $tax_today_com = $tax_mtd_com = $tax_ytd_com = 0; @endphp @foreach($segments as $segment) @if (!in_array($segment->segment_id, ['10','11']) ) @continue @endif @php $jml_room_day_com += @$segment->room; $jml_rvnu_day_com += @$segment->revenue; $jml_room_mon_com += @$segment->room_mtd; $jml_rvnu_mon_com += @$segment->revenue_mtd; $jml_room_yer_com += @$segment->room_ytd; $jml_rvnu_yer_com += @$segment->revenue_ytd; $serv_today_com += @$segment->service; $serv_mtd_com += @$segment->service_mtd; // dump('segment:'.@$segment->service_mtd); $serv_ytd_com += @$segment->service_ytd; $tax_today_com += @$segment->tax; $tax_mtd_com += @$segment->tax_mtd; $tax_ytd_com += @$segment->tax_ytd; @endphp @endforeach
ADDITIONAL SEGMENT TODAY MONTH TO DATE YEAR TO DATE
ROOMS REVENUE ROOMS REVENUE ROOMS REVENUE
{{ config('custom.segment_ratecodes.'.$segment->segment_id) }} {{ @$segment->room ? ($segment->room) : '-' }} {{ @$segment->revenue ? ($segment->revenue) : '-' }} {{ @$segment->room_mtd ? ($segment->room_mtd) : '-' }} {{ @$segment->revenue_mtd ? ($segment->revenue_mtd) : '-'}} {{ @$segment->room_ytd ? ($segment->room_ytd) : '-' }} {{ @$segment->revenue_ytd ? ($segment->revenue_ytd) : '-'}}
TOTAL ROOM SALES {{ ($jml_room_day_com) }} {{ ($jml_rvnu_day_com) }} {{ ($jml_room_mon_com) }} {{ ($jml_rvnu_mon_com) }} {{ ($jml_room_yer_com) }} {{ ($jml_rvnu_yer_com) }}

@php $rev_ota_tdy = $rev_ota_mtd = $rev_ota_ytd = 0; @endphp @foreach($array_price_per_ota as $ota) @php $rev_ota_tdy += @$ota->price; $rev_ota_mtd += @$ota->price_ota_mtd; $rev_ota_ytd += @$ota->price_ota_ytd; @endphp @endforeach
OTA LIST TODAY MONTH TO DATE YEAR TO DATE
{{ @$ota->company->name }} {{ @$ota->price ? ($ota->price) : '-' }} {{ @$ota->price_ota_mtd ? ($ota->price_ota_mtd) : '-' }} {{ @$ota->price_ota_ytd ? ($ota->price_ota_ytd) : '-' }}
TOTAL REVENUE {{ ($rev_ota_tdy) }} {{ ($rev_ota_mtd) }} {{ ($rev_ota_ytd) }}
@php $budget_room_available = $budget_room_occupied = $budget_room_occupied_pay_only = 0; $var_today_occupied = $var_today_occupied_paying = $comp_tdy = 0; $b_tdy=$b_mtd=$v_tdy=$v_mtd=0; foreach($room_statistics as $room_stat_hidden){ if ($room_stat_hidden->statistic_id == 20) { $b_tdy = $room_stat_hidden->budget; $b_mtd = $room_stat_hidden->budget_mtd; $v_tdy = $room_inventory - $b_tdy; $v_mtd = $room_inventory - $b_mtd; } } @endphp @php $room_occupied_variable_hidden_tdy = $room_occupied_variable_hidden_mtd = $room_occupied_variable_hidden_ytd = 0; $room_ava_variable_hidden_tdy = $room_ava_variable_hidden_mtd = $room_ava_variable_hidden_ytd = 0; $room_g_in_variable_hidden_tdy = $room_g_in_variable_hidden_mtd = $room_g_in_variable_hidden_ytd = 0; foreach($room_statistics as $room_stat_hidden){ if ($room_stat_hidden->statistic_id == 8) { $room_occupied_variable_hidden_tdy = $room_stat_hidden->today; $room_occupied_variable_hidden_mtd = $room_stat_hidden->mtd; $room_occupied_variable_hidden_ytd = $room_stat_hidden->ytd; } if ($room_stat_hidden->statistic_id == 1) { $room_ava_variable_hidden_tdy = $room_stat_hidden->today; $room_ava_variable_hidden_mtd = $room_stat_hidden->mtd; $room_ava_variable_hidden_ytd = $room_stat_hidden->ytd; } if ($room_stat_hidden->statistic_id == 13) { $room_g_in_variable_hidden_tdy = $room_stat_hidden->today; $room_g_in_variable_hidden_mtd = $room_stat_hidden->mtd; $room_g_in_variable_hidden_ytd = $room_stat_hidden->ytd; } // if ($room_stat_hidden->statistic_id == 16) { // $room_stat_hidden->today = $room_stat_hidden->today - $data_ota_total_tdy; // $room_stat_hidden->mtd = $room_stat_hidden->mtd - $data_ota_total_mtd; // $room_stat_hidden->ytd = $room_stat_hidden->ytd - $data_ota_total_ytd; // } if ($room_stat_hidden->statistic_id == 19) { $house_mtd = $room_stat_hidden->mtd; $house_bud = $room_stat_hidden->budget_mtd; $house_var = ($room_stat_hidden->mtd - $room_stat_hidden->budget_mtd); $house_ytd = $room_stat_hidden->ytd; $house_tdy = $room_stat_hidden->today; } } // dump($jml_rvnu_day/$room_occupied_variable_hidden_tdy); @endphp @foreach($room_statistics as $room_stat) @if($room_stat->statistic_id>0 && $room_stat->statistic_id != 20) @php if($room_stat->statistic_id==1) { //room available $room_mtd = $room_stat->mtd; $room_bud = $room_stat->budget_mtd; $room_var = ($room_stat->mtd - $room_stat->budget_mtd); $room_ytd = $room_stat->ytd; $budget_room_available = $room_stat->budget; //ambil budget room available $var_room_available = $room_stat->today - $room_stat->budget; //Variance room available } elseif($room_stat->statistic_id==3) { //compliment $comp_mtd = $room_stat->mtd; $comp_bud = $room_stat->budget_mtd; $comp_var = ($room_stat->mtd - $room_stat->budget_mtd); $comp_ytd = $room_stat->ytd; $comp_tdy = $room_stat->today; } elseif($room_stat->statistic_id==7) { //room occupied $occu_mtd = $room_stat->mtd; $occu_bud = $room_stat->budget_mtd; $occu_var = ($room_stat->mtd - $room_stat->budget_mtd); $occu_ytd = $room_stat->ytd; $budget_room_occupied = $room_stat->budget; //Ambil Budget Room Occupied }elseif ($room_stat->statistic_id==8) { // Room Occupied (Paying Only) $budget_room_occupied_pay_only = $room_stat->budget; } elseif ($room_stat->statistic_id==19) { // House Use $house_mtd = $room_stat->mtd; $house_bud = $room_stat->budget_mtd; $house_var = ($room_stat->mtd - $room_stat->budget_mtd); $house_ytd = $room_stat->ytd; $house_tdy = $room_stat->today; }elseif ($room_stat->statistic_id==18) { // Average Room Rates $average_room_rates_tdy = ($room_occupied_variable_hidden_tdy > 0) ? ($lodgin_tdy_pre_view-@$jml_rvnu_day_com)/$room_occupied_variable_hidden_tdy : 0; $average_room_rates_mtd = ($room_occupied_variable_hidden_mtd > 0) ? ($lodgin_mtd_pre_view-@$jml_rvnu_mon_com)/$room_occupied_variable_hidden_mtd : 0; $average_room_rates_ytd = ($room_occupied_variable_hidden_ytd > 0) ? ($lodgin_ytd_pre_view-@$jml_rvnu_yer_com)/$room_occupied_variable_hidden_ytd : 0; }elseif ($room_stat->statistic_id==15) { $revpar_tdy = ($room_ava_variable_hidden_tdy > 0) ? ($lodgin_tdy_pre_view-@$jml_rvnu_day_com)/$room_ava_variable_hidden_tdy : 0; $revpar_mtd = ($room_ava_variable_hidden_mtd > 0) ? ($lodgin_mtd_pre_view-@$jml_rvnu_mon_com)/$room_ava_variable_hidden_mtd : 0; $revpar_ytd = ($room_ava_variable_hidden_ytd > 0) ? $lodgin_ytd_pre_view/$room_ava_variable_hidden_ytd : 0; }elseif ($room_stat->statistic_id==16) { $revpar_tdy = ($room_g_in_variable_hidden_tdy > 0) ? ($lodgin_tdy_pre_view-@$jml_rvnu_day_com)/$room_g_in_variable_hidden_tdy : 0; $revpar_mtd = ($room_g_in_variable_hidden_mtd > 0) ? ($lodgin_mtd_pre_view-@$jml_rvnu_mon_com)/$room_g_in_variable_hidden_mtd : 0; $revpar_ytd = ($room_g_in_variable_hidden_ytd > 0) ? ($lodgin_ytd_pre_view-@$jml_rvnu_yer_com)/$room_g_in_variable_hidden_ytd : 0; } @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; // Calculate budget today room occupied % $budget_today_perc = ($budget_room_occupied>0) ? (($budget_room_occupied/$budget_room_available)*100): 0; // Calculate variance today room occupied % $var_today = $room_stat->today - $room_stat->budget; // $var_today_perc = ($room_var>0) ? ((($var_today)/$room_var)*100) : 0; $var_today_perc = number_format($var_today, 2, ".", ","); $mtd = number_format($mtd, 2, ".", ","); $var = number_format($var, 2, ".", ","); $ytd = number_format($ytd, 2, ".", ","); @endphp @elseif($room_stat->statistic_id==10) @php $mtd = $room_mtd>0 ? ((($occu_mtd-$comp_mtd-$house_mtd)/$room_mtd)*100) : 0; $bud = $room_bud>0 ? ((($occu_bud-$comp_bud-$house_bud)/$room_bud)*100) : 0; $var = $room_var>0 ? ((($occu_var-$comp_var-$house_var)/$room_var)*100) : 0; $ytd = $room_ytd>0 ? ((($occu_ytd-$comp_ytd-$house_ytd)/$room_ytd)*100) : 0; // Calculate budget today room occupied paying_only % $budget_today_perc = ($budget_room_occupied>0) ? (($budget_room_occupied_pay_only/$budget_room_available)*100) : 0; // Calculate variance today room occupied paying_only % $var_today = $room_stat->today - $room_stat->budget; // $var_today_perc = ($var_room_available>0) ? ((($var_today-$comp_tdy-$house_tdy)/$var_room_available)*100) : 0; // $var_today_perc = number_format($var, 2, ".", ","); $mtd = number_format($mtd, 2, ".", ","); $var = number_format($var, 2, ".", ","); $ytd = number_format($ytd, 2, ".", ","); $var_today_perc = $var_today; $var_mtd_perc = $mtd - $bud; @endphp @elseif ($room_stat->statistic_id==17) @php $lentgh_st_mtd = $room_stat->mtd / $room_stat->count_data_mtd; $lentgh_st_ytd = $room_stat->ytd / $room_stat->count_data_ytd; @endphp @elseif ($room_stat->statistic_id == 18) @elseif ($room_stat->statistic_id == 15 || $room_stat->statistic_id == 16) @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->mtd - $room_stat->budget_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->mtd - $room_stat->budget_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->mtd - $room_stat->budget_mtd); $occu_ytd = $room_stat->ytd; } if ($room_stat->statistic_id == 0) { $lodging_day += $room_stat->today; $lodging_bdy += $room_stat->budget; $lodging_vdy += ($room_stat->today - $room_stat->budget); $lodging_mtd += $room_stat->mtd; $lodging_bud += $room_stat->budget_mtd; $lodging_var += ($room_stat->mtd - $room_stat->budget_mtd); $lodging_ytd += $room_stat->ytd; } @endphp @endif @endforeach
ROOM STATISTIC TODAY MONTH TO DATE YTD
TODAY BUDGET VARIANCE MTD BUDGET VARIANCE
Room Inventory {{ ($room_inventory) }} {{ ($b_tdy) }} {{ ($v_tdy) }} {{ ($room_inventory) }} {{ ($b_tdy) }} {{ ($v_mtd) }} {{ ($room_inventory) }}
{{ config('custom.room_statistic.'.$room_stat->statistic_id) }}{{ ($room_stat->today ) }}% {{ ($budget_today_perc ) }}% {{ ($var_today_perc ) }}% {{ ($mtd ) }}% {{ ($bud ) }}% {{ ($var ) }}% {{ ($ytd ) }}%{{ ($room_stat->today ) }}% {{ ($budget_today_perc ) }}% {{ ($var_today_perc ) }}% {{ ($mtd ) }}% {{ ($bud ) }}% {{ ($var_mtd_perc ) }}% {{ ($ytd ) }}%{{ ($room_stat->today ) }} {{ ($room_stat->budget ) }} {{ $room_stat->today - $room_stat->budget < 0 ? '('.(($room_stat->today - $room_stat->budget) *-1).')' : ($room_stat->today - $room_stat->budget) }} {{ ($lentgh_st_mtd ) }} {{ ($room_stat->budget_mtd ) }} {{ $lentgh_st_mtd - $room_stat->budget_mtd < 0 ? '('.(($lentgh_st_mtd - $room_stat->budget_mtd) *-1).')' : ($lentgh_st_mtd - $room_stat->budget_mtd) }} {{ ($lentgh_st_ytd ) }}{{ ($average_room_rates_tdy ) }} {{ ($average_room_rates_tdy - $room_stat->budget < 0 ? '('.(($average_room_rates_tdy - $room_stat->budget) * -1).')' : ($average_room_rates_tdy - $room_stat->budget)) }} {{ ($average_room_rates_tdy ) }} {{ ($average_room_rates_mtd ) }} {{ ($average_room_rates_mtd - $room_stat->budget_mtd < 0 ? '('.(($average_room_rates_mtd - $room_stat->budget_mtd) * -1).')' : ($average_room_rates_mtd - $room_stat->budget_mtd)) }} {{ ($average_room_rates_mtd ) }} {{ ($average_room_rates_ytd ) }}{{ ribuanWithComma($revpar_tdy, 2, ".", "") }} {{ ($revpar_tdy - $room_stat->budget < 0 ? '('.($revpar_tdy - $room_stat->budget * -1).')' : ($revpar_tdy - $room_stat->budget)) }} {{ ribuanWithComma($revpar_tdy, 2, ".", "") }} {{ ribuanWithComma($revpar_mtd, 2, ".", "") }} {{ ($revpar_mtd - $room_stat->budget_mtd < 0 ? '('.($revpar_mtd - $room_stat->budget_mtd * -1).')' : ($revpar_mtd - $room_stat->budget_mtd)) }} {{ ribuanWithComma($revpar_mtd, 2, ".", "") }} {{ ribuanWithComma($revpar_ytd, 2, ".", " ") }}{{ ($room_stat->today) }} {{ ($room_stat->budget) }} {{ ($room_stat->today - $room_stat->budget) < 0 ? '('.(($room_stat->today - $room_stat->budget) *-1).')' : $room_stat->today - $room_stat->budget }} {{ ($room_stat->mtd) }} {{ ($room_stat->budget_mtd) }} {{ $room_stat->mtd - $room_stat->budget_mtd < 0 ? '('.(($room_stat->mtd - $room_stat->budget_mtd) *-1).')' : $room_stat->mtd - $room_stat->budget_mtd }} {{ ($room_stat->ytd) }}

@php $shopid = 0; $total_today = $total_food = $total_beverages = $total_other_fb = 0; $total_budget_day = $total_food_budget = $total_beverages_budget = $total_other_fb_budget =0; $total_variance_day = $total_food_variance_today = $total_beverages_variance_today = $total_other_fb_variance_today =0; $total_mtd = $total_food_mtd = $total_beverages_mtd = $total_other_fb_mtd =0; $total_budget_mtd = $total_food_budget_mtd = $total_beverages_budget_mtd = $total_other_fb_budget_mtd =0; $total_variance_mtd = $total_food_variance_mtd = $total_beverages_variance_mtd = $total_other_fb_variance_mtd = 0; $total_ytd = $total_food_ytd = $total_beverages_ytd = $total_other_fb_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 @php $shopid = 0; $total_today = $total_food = $total_beverages = $total_other_fb = 0; $total_budget_day = $total_food_budget = $total_beverages_budget = $total_other_fb_budget =0; $total_variance_day = $total_food_variance_today = $total_beverages_variance_today = $total_other_fb_variance_today =0; $total_mtd = $total_food_mtd = $total_beverages_mtd = $total_other_fb_mtd =0; $total_budget_mtd = $total_food_budget_mtd = $total_beverages_budget_mtd = $total_other_fb_budget_mtd =0; $total_variance_mtd = $total_food_variance_mtd = $total_beverages_variance_mtd = $total_other_fb_variance_mtd = 0; $total_ytd = $total_food_ytd = $total_beverages_ytd = $total_other_fb_ytd =0; $shop_name=''; @endphp @php $rm_rv_disc_tdy = $rm_rv_disc_mtd = $rm_rv_disc_ytd = 0; // substract hu/comp nominal $lodging_day = $lodging_day - $jml_rvnu_day_com; $lodging_vdy = $lodging_day - $lodging_bdy; $lodging_mtd = $lodging_mtd - $jml_rvnu_mon_com; $lodging_var = $lodging_mtd - $lodging_bud; $lodging_ytd = $lodging_ytd - $jml_rvnu_yer_com; @endphp @foreach($room_revenue_items as $shop_room_idx=>$shop_room) @php $shop_room['today'] = round($shop_room['today'] - (@$payable_to_substracts_per_item[$shop_room_idx]['today_pay']) - (@$payable_to_substracts_per_item[$shop_room_idx]['today_serv']) - (@$payable_to_substracts_per_item[$shop_room_idx]['today_tax'])); $shop_room['mtd'] = $shop_room['mtd'] - (@$payable_to_substracts_per_item[$shop_room_idx]['mtd_pay']) - (@$payable_to_substracts_per_item[$shop_room_idx]['mtd_serv']) - (@$payable_to_substracts_per_item[$shop_room_idx]['mtd_tax']); $shop_room['ytd'] = $shop_room['ytd'] - (@$payable_to_substracts_per_item[$shop_room_idx]['ytd_pay']) - (@$payable_to_substracts_per_item[$shop_room_idx]['ytd_serv']) - (@$payable_to_substracts_per_item[$shop_room_idx]['ytd_tax']); // skip yang data kosong if ($shop_room['today'] === 0 && $shop_room['mtd'] === 0 && $shop_room['ytd'] === 0) { continue; } $shop_room['service'] = $shop_room['service']; $shop_room['service_mtd'] = $shop_room['service_mtd']; $shop_room['service_ytd'] = $shop_room['service_ytd']; $shop_room['tax'] = $shop_room['tax']; $shop_room['tax_mtd'] = $shop_room['tax_mtd']; $shop_room['tax_ytd'] = $shop_room['tax_ytd']; @endphp {{-- @foreach($shop_statistics_room as $shop_room) --}} {{-- @if ($shop_room->revenue_group != 1) --}} @php $lodging_day += $shop_room['today']; $lodging_bdy += $shop_room['budget']; $lodging_vdy += ($shop_room['today'] - $shop_room['budget']); // total budget today $lodging_mtd += $shop_room['mtd']; $lodging_bud += $shop_room['budget_mtd']; $lodging_var += ($shop_room['mtd'] - $shop_room['budget_mtd']); // total budget MTD $lodging_ytd += $shop_room['ytd']; $serv_today += @$shop_room['service']; $serv_mtd += @$shop_room['service_mtd']; $serv_ytd += @$shop_room['service_ytd']; $tax_today += @$shop_room['tax']; $tax_mtd += @$shop_room['tax_mtd']; $tax_ytd += @$shop_room['tax_ytd']; $rm_rv_disc_tdy += @$shop_room['diskon'] ?? 0; $rm_rv_disc_mtd += @$shop_room['diskon_mtd'] ?? 0; $rm_rv_disc_ytd += @$shop_room['diskon_ytd'] ?? 0; @endphp {{-- @endif --}} @endforeach @php $rm_rv_disc_tdy = $rm_rv_disc_tdy *-1; $rm_rv_disc_mtd = $rm_rv_disc_mtd *-1; $rm_rv_disc_ytd = $rm_rv_disc_ytd *-1; $lodging_day += $rm_rv_disc_tdy; $lodging_vdy += $rm_rv_disc_tdy; $lodging_mtd += $rm_rv_disc_mtd; $lodging_var += $rm_rv_disc_mtd; $lodging_ytd += $rm_rv_disc_ytd; @endphp {{-- Discount & Allowance --}} @if ($shop_statistics[1]) {{-- --}} @php $b_fast_today = 0; $b_fast_mtd = 0; $b_fast_ytd = 0; $b_fast_tbdgt = 0; $b_fast_tvar = 0; $b_fast_bdgtmtd = 0; $serv_bfast_tdy = 0; $serv_bfast_mtd = 0; $serv_bfast_ytd = 0; $tax_bfast_tdy = 0; $tax_bfast_mtd = 0; $tax_bfast_ytd = 0; @endphp {{-- @foreach($shop_statistics_room_breakfast as $shop_room) @if ($shop_room->revenue_group == 1) @php $b_fast_today += $shop_room->today;// total tdy $b_fast_tbdgt += $shop_room->budget;// total budget $b_fast_mtd += ($shop_room->mtd); // total mtd $b_fast_bdgtmtd += ($shop_room->budget_mtd); // total budget mtd $b_fast_ytd += ($shop_room->ytd); // total ytd $serv_today += @$shop_room->service; $serv_mtd += @$shop_room->service_mtd; $serv_ytd += @$shop_room->service_ytd; $tax_today += @$shop_room->tax; $tax_mtd += @$shop_room->tax_mtd; $tax_ytd += @$shop_room->tax_ytd; @endphp @endif @endforeach @php $total_today += $b_fast_today; $total_budget_day += $b_fast_tbdgt; $total_variance_day += ($b_fast_today - $b_fast_tbdgt); $total_mtd += $b_fast_mtd; $total_budget_mtd += $b_fast_bdgtmtd; $total_variance_mtd += ($b_fast_mtd - $b_fast_bdgtmtd); $total_ytd += $b_fast_ytd; $total_food += $b_fast_today; $total_food_budget += $b_fast_tbdgt; $total_food_variance_today += ($b_fast_today - $b_fast_tbdgt); $total_food_mtd += $b_fast_mtd; $total_food_budget_mtd += $b_fast_bdgtmtd; $total_food_variance_mtd += ($b_fast_mtd - $b_fast_bdgtmtd); $total_food_ytd += $b_fast_ytd; @endphp --}} @foreach ($shop_statistics[1] as $title=>$shop_stats) @php $food_discount_allowance = $food_discount_allowance_mtd = $food_discount_allowance_ytd = 0; @endphp @foreach ($shop_stats as $shop_stat) @php // $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['today_pay']); // $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['mtd_pay']); // $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['ytd_pay']); $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_pay']); $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_pay']); $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_pay']); // skip yang data kosong if ($this_today === 0 && $this_mtd === 0 && $this_ytd === 0) { continue; } $shop_stat->service = $shop_stat->service - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_serv']); $shop_stat->serv_mtd = $shop_stat->service_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_serv']); $shop_stat->serv_ytd = $shop_stat->service_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_serv']); $shop_stat->tax = $shop_stat->tax - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_tax']); $shop_stat->tax_mtd = $shop_stat->tax_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_tax']); $shop_stat->tax_ytd = $shop_stat->tax_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_tax']); $food_discount_allowance += @$shop_stat->diskon; $food_discount_allowance_mtd += @$shop_stat->diskon_mtd; $food_discount_allowance_ytd += @$shop_stat->diskon_ytd; @endphp @php $total_today += $this_today; $total_budget_day += $shop_stat->budget; $total_variance_day += ($this_today - $shop_stat->budget); $total_mtd += $this_mtd; $total_budget_mtd += $shop_stat->budget_mtd; $total_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_ytd += $this_ytd; $total_food += $this_today; $total_food_budget += $shop_stat->budget; $total_food_variance_today += ($this_today - $shop_stat->budget); $total_food_mtd += $this_mtd; $total_food_budget_mtd += $shop_stat->budget_mtd; $total_food_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_food_ytd += $this_ytd; $serv_today += @$shop_stat->service; $serv_mtd += @$shop_stat->service_mtd; $serv_ytd += @$shop_stat->service_ytd; $tax_today += @$shop_stat->tax; $tax_mtd += @$shop_stat->tax_mtd; $tax_ytd += @$shop_stat->tax_ytd; @endphp @endforeach {{-- Discount & Allowance --}} @php // total food subsctract by discount n allowance $total_food = $total_food - $food_discount_allowance; $total_food_mtd = $total_food_mtd - $food_discount_allowance_mtd; $total_food_ytd = $total_food_ytd - $food_discount_allowance_ytd; $total_food_variance_today = $total_food_variance_today - $food_discount_allowance; $total_food_variance_mtd = $total_food_variance_mtd - $food_discount_allowance_mtd; $total_today = $total_today - $food_discount_allowance; $total_mtd = $total_mtd - $food_discount_allowance_mtd; $total_ytd = $total_ytd - $food_discount_allowance_ytd; $total_variance_day = $total_variance_day - $food_discount_allowance; $total_variance_mtd = $total_variance_mtd - $food_discount_allowance_mtd; @endphp @endforeach @endif @if ($shop_statistics[2]) @foreach ($shop_statistics[2] as $title=>$shop_stats ) @php // ?define variable that store discount and allowance $beverages_discount_allowance = $beverages_discount_allowance_mtd = $beverages_discount_allowance_ytd = 0; @endphp @foreach ($shop_stats as $shop_stat) @php // $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['today_pay'] ?? 0); // $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['mtd_pay'] ?? 0); // $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['ytd_pay'] ?? 0); $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_pay'] ?? 0); $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_pay'] ?? 0); $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_pay'] ?? 0); // skip yang data kosong if ($this_today === 0 && $this_mtd === 0 && $this_ytd === 0) { continue; } $shop_stat->service = $shop_stat->service - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_serv']); $shop_stat->serv_mtd = $shop_stat->service_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_serv']); $shop_stat->serv_ytd = $shop_stat->service_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_serv']); $shop_stat->tax = $shop_stat->tax - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_tax']); $shop_stat->tax_mtd = $shop_stat->tax_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_tax']); $shop_stat->tax_ytd = $shop_stat->tax_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_tax']); // discount and allowance store $beverages_discount_allowance += @$shop_stat->diskon; $beverages_discount_allowance_mtd += @$shop_stat->diskon_mtd; $beverages_discount_allowance_ytd += @$shop_stat->diskon_ytd; @endphp @php $total_today += $this_today; $total_budget_day += $shop_stat->budget; $total_variance_day += ($this_today - $shop_stat->budget); $total_mtd += $this_mtd; $total_budget_mtd += $shop_stat->budget_mtd; $total_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_ytd += $this_ytd; $total_beverages += $this_today; $total_beverages_budget += $shop_stat->budget; $total_beverages_variance_today += ($this_today - $shop_stat->budget); $total_beverages_mtd += $this_mtd; $total_beverages_budget_mtd += $shop_stat->budget_mtd; $total_beverages_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_beverages_ytd += $this_ytd; $serv_today += @$shop_stat->service; $serv_mtd += @$shop_stat->service_mtd; $serv_ytd += @$shop_stat->service_ytd; $tax_today += @$shop_stat->tax; $tax_mtd += @$shop_stat->tax_mtd; $tax_ytd += @$shop_stat->tax_ytd; @endphp @endforeach {{-- Discount & Allowance --}} @php // total beverages subsctract by discount n allowance $total_beverages = $total_beverages - $beverages_discount_allowance; $total_beverages_mtd = $total_beverages_mtd - $beverages_discount_allowance_mtd; $total_beverages_ytd = $total_beverages_ytd - $beverages_discount_allowance_ytd; $total_beverages_variance_today = $total_beverages_variance_today - $beverages_discount_allowance; $total_beverages_variance_mtd = $total_beverages_variance_mtd - $beverages_discount_allowance_mtd; $total_today = $total_today - $beverages_discount_allowance; $total_mtd = $total_mtd - $beverages_discount_allowance_mtd; $total_ytd = $total_ytd - $beverages_discount_allowance_ytd; $total_variance_day = $total_variance_day - $beverages_discount_allowance; $total_variance_mtd = $total_variance_mtd - $beverages_discount_allowance_mtd; @endphp @endforeach @endif @if ($shop_statistics[3] || $shop_statistics[99]) @php // ?define variable that store discount and allowance $other_discount_allowance = $other_discount_allowance_mtd = $other_discount_allowance_ytd = 0; @endphp @if ($shop_statistics[3]) @foreach ($shop_statistics[3] as $title=>$shop_stats ) @foreach ($shop_stats as $shop_stat) @php // $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['today_pay'] ?? 0); // $this_mtd = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['mtd_pay'] ?? 0); // $this_ytd = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['ytd_pay'] ?? 0); $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_pay'] ?? 0); $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_pay'] ?? 0); $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_pay'] ?? 0); // skip yang data kosong if ($this_today === 0 && $this_mtd === 0 && $this_ytd === 0) { continue; } $shop_stat->service = $shop_stat->service - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_serv']); $shop_stat->serv_mtd = $shop_stat->service_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_serv']); $shop_stat->serv_ytd = $shop_stat->service_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_serv']); $shop_stat->tax = $shop_stat->tax - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_tax']); $shop_stat->tax_mtd = $shop_stat->tax_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_tax']); $shop_stat->tax_ytd = $shop_stat->tax_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_tax']); // discount and allowance store $other_discount_allowance += @$shop_stat->diskon; $other_discount_allowance_mtd += @$shop_stat->diskon_mtd; $other_discount_allowance_ytd += @$shop_stat->diskon_ytd; @endphp @php $total_today += $this_today; $total_budget_day += $shop_stat->budget; $total_variance_day += ($this_today - $shop_stat->budget); $total_mtd += $this_mtd; $total_budget_mtd += $shop_stat->budget_mtd; $total_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_ytd += $this_ytd; $total_other_fb += $this_today; $total_other_fb_budget += $shop_stat->budget; $total_other_fb_variance_today += ($this_today - $shop_stat->budget); $total_other_fb_mtd += $this_mtd; $total_other_fb_budget_mtd += $shop_stat->budget_mtd; $total_other_fb_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_other_fb_ytd += $this_ytd; $serv_today += @$shop_stat->service; $serv_mtd += @$shop_stat->service_mtd; $serv_ytd += @$shop_stat->service_ytd; $tax_today += @$shop_stat->tax; $tax_mtd += @$shop_stat->tax_mtd; $tax_ytd += @$shop_stat->tax_ytd; @endphp @endforeach {{-- Discount & Allowance --}} @endforeach @endif @if ($shop_statistics[99]) @foreach ($shop_statistics[99] as $title=>$shop_stats ) @foreach ($shop_stats as $shop_stat) @if ($shop_stat->tipe_menu_id===0||$shop_stat->tipe_menu_id>0) @php // $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['today_pay'] ?? 0); // $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['mtd_pay'] ?? 0); // $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->shop_id]['ytd_pay'] ?? 0); $this_today = $shop_stat->today - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_pay'] ?? 0); $this_mtd = $shop_stat->mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_pay'] ?? 0); $this_ytd = $shop_stat->ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_pay'] ?? 0); // skip yang data kosong if ($this_today === 0 && $this_mtd === 0 && $this_ytd === 0) { continue; } $shop_stat->service = $shop_stat->service - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_serv']); $shop_stat->serv_mtd = $shop_stat->service_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_serv']); $shop_stat->serv_ytd = $shop_stat->service_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_serv']); $shop_stat->tax = $shop_stat->tax - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['today_tax']); $shop_stat->tax_mtd = $shop_stat->tax_mtd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['mtd_tax']); $shop_stat->tax_ytd = $shop_stat->tax_ytd - (@$payable_to_substracts[$shop_stat->tipe_category_id][$shop_stat->tipe_menu_id]['ytd_tax']); // discount and allowance store $other_discount_allowance += @$shop_stat->diskon; $other_discount_allowance_mtd += @$shop_stat->diskon_mtd; $other_discount_allowance_ytd += @$shop_stat->diskon_ytd; @endphp @php $total_today += $this_today; $total_budget_day += $shop_stat->budget; $total_variance_day += ($this_today - $shop_stat->budget); $total_mtd += $this_mtd; $total_budget_mtd += $shop_stat->budget_mtd; $total_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_ytd += $this_ytd; $total_other_fb += $this_today; $total_other_fb_budget += $shop_stat->budget; $total_other_fb_variance_today += ($this_today - $shop_stat->budget); $total_other_fb_mtd += $this_mtd; $total_other_fb_budget_mtd += $shop_stat->budget_mtd; $total_other_fb_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $total_other_fb_ytd += $this_ytd; $serv_today += @$shop_stat->service; $serv_mtd += @$shop_stat->service_mtd; $serv_ytd += @$shop_stat->service_ytd; $tax_today += @$shop_stat->tax; $tax_mtd += @$shop_stat->tax_mtd; $tax_ytd += @$shop_stat->tax_ytd; @endphp @endif @endforeach {{-- Discount & Allowance --}} @endforeach @endif @php // total other subsctract by discount n allowance $total_other_fb = $total_other_fb - $other_discount_allowance; $total_other_fb_mtd = $total_other_fb_mtd - $other_discount_allowance_mtd; $total_other_fb_ytd = $total_other_fb_ytd - $other_discount_allowance_ytd; $total_other_fb_variance_today = $total_other_fb_variance_today - $other_discount_allowance; $total_other_fb_variance_mtd = $total_other_fb_variance_mtd - $other_discount_allowance_mtd; $total_today = $total_today - $other_discount_allowance; $total_mtd = $total_mtd - $other_discount_allowance_mtd; $total_ytd = $total_ytd - $other_discount_allowance_ytd; $total_variance_day = $total_variance_day - $other_discount_allowance; $total_variance_mtd = $total_variance_mtd - $other_discount_allowance_mtd; @endphp @endif {{-- @endforeach --}} @php $gtotal_today += $total_today; $gtotal_budget_day += $total_budget_day; $gtotal_variance_day += $total_variance_day; $gtotal_mtd += $total_mtd; $gtotal_budget_mtd += $total_budget_mtd; $gtotal_variance_mtd += $total_variance_mtd; $gtotal_ytd += $total_ytd; @endphp @php $other_shopid = 0; $other_total_today=0; $other_total_budget_day=0; $other_total_variance_day=0; $other_total_mtd=0; $other_total_budget_mtd=0; $other_total_variance_mtd=0; $other_total_ytd=0; $other_shop_name=''; @endphp {{-- @foreach($shop_statistics_others as $shop_stat) --}} @foreach($shop_statistics_per_shops as $shop_stat) {{-- @if($shop_stat->tipe_menu_id>0) --}} @php $this_today = $shop_stat->today - ((@$payable_per_shops[$shop_stat->shop_id]->payable) - (@$payable_per_shops[$shop_stat->shop_id]->tax) - (@$payable_per_shops[$shop_stat->shop_id]->services)); $this_mtd = $shop_stat->mtd - ((@$payable_per_shops[$shop_stat->shop_id]->mtd_pay) - (@$payable_per_shops[$shop_stat->shop_id]->mtd_tax) - (@$payable_per_shops[$shop_stat->shop_id]->mtd_serv)); $this_ytd = $shop_stat->ytd - ((@$payable_per_shops[$shop_stat->shop_id]->ytd_pay) - (@$payable_per_shops[$shop_stat->shop_id]->ytd_tax) - (@$payable_per_shops[$shop_stat->shop_id]->ytd_serv)); // skip yang data kosong if ($this_today === 0 && $this_mtd === 0 && $this_ytd === 0) { continue; } @endphp @php $other_total_today += $this_today; $other_total_budget_day += $shop_stat->budget; $other_total_variance_day += ($this_today - $shop_stat->budget); $other_total_mtd += $this_mtd; $other_total_budget_mtd += $shop_stat->budget_mtd; $other_total_variance_mtd += ($this_mtd - $shop_stat->budget_mtd); $other_total_ytd += $this_ytd; $serv_today += @$shop_stat->service; $serv_mtd += @$shop_stat->service_mtd; $serv_ytd += @$shop_stat->service_ytd; $tax_today += @$shop_stat->tax; $tax_mtd += @$shop_stat->tax_mtd; $tax_ytd += @$shop_stat->tax_ytd; @endphp {{-- @endif --}} @endforeach @php $gtotal_today += $other_total_today; $gtotal_budget_day += $other_total_budget_day; $gtotal_variance_day += $other_total_variance_day; $gtotal_mtd += $other_total_mtd; $gtotal_budget_mtd += $other_total_budget_mtd; $gtotal_variance_mtd += $other_total_variance_mtd; $gtotal_ytd += $other_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; // Calculate serv & tax budget today $serv_budget = $gtotal_budget_day * $global_services / 100; $tax_budget = ($gtotal_budget_day + $serv_budget) * $global_tax / 100; // Calculate serv & tax budget MTD $serv_mtd_budget = $gtotal_budget_mtd * $global_services /100; $tax_mtd_budget = ($gtotal_budget_mtd + $serv_mtd_budget) * $global_tax /100; @endphp {{-- Service & Tax --}}
DESCRIPTION TODAY MONTH TO DATE YTD
TODAY BUDGET VARIANCE MTD BUDGET VARIANCE
Room Revenue
Lodging {{ (@$lodging_day) }} {{ (@$lodging_bdy) }} {{ (@$lodging_vdy < 0 ? '('.(@$lodging_vdy *-1).')' : (@$lodging_vdy)) }} {{ (@$lodging_mtd) }} {{ (@$lodging_bud) }} {{ (@$lodging_var < 0 ? '('.(@$lodging_var *-1).')' : (@$lodging_var)) }} {{ (@$lodging_ytd) }}
@if($shop_room->nama ?? $shop_room['item']) {{$shop_room->nama ?? $shop_room['item']}} @else Custom Menu @endif {{-- @if($shop_room->menu_id>0) {{ $shop_room->menu_id ? $shop_room->item->nama : ' - ' }} {{ @$shop_stat->shop ? "(".@$shop_stat->shop->nama.")" : '' }} @elseif($shop_room->menu_id===0) Custom Menu {{ @$shop_stat->shop ? "(".@$shop_stat->shop->nama.")" : '' }} @elseif(!$shop_room->menu_id) Discount {{ @$shop_stat->shop ? "(".@$shop_stat->shop->nama.")" : '' }} @endif --}} {{ ($shop_room['today']) }} {{ ($shop_room['budget']) }} {{ $shop_room['today'] - $shop_room['budget'] < 0 ? '('.(($shop_room['today'] - $shop_room['budget']) *-1).')' : ($shop_room['today'] - $shop_room['budget']) }} {{ ($shop_room['mtd']) }} {{ ($shop_room['budget_mtd']) }} {{ $shop_room['mtd'] - $shop_room['budget_mtd'] < 0 ? '('.(($shop_room['mtd'] - $shop_room['budget_mtd']) *-1).')' : ($shop_room['mtd'] - $shop_room['budget_mtd']) }} {{ ($shop_room['ytd']) }}
    {{'Discount & Allowance'}} {{ $rm_rv_disc_tdy < 0 ? '('.ribuan($rm_rv_disc_tdy).')' : ribuan($rm_rv_disc_tdy) }} {{ '-' }} {{ $rm_rv_disc_tdy < 0 ? '('.ribuan($rm_rv_disc_tdy).')' : ribuan($rm_rv_disc_tdy) }} {{ $rm_rv_disc_mtd < 0 ? '('.ribuan($rm_rv_disc_mtd).')' : ribuan($rm_rv_disc_mtd) }} {{ '-' }} {{ $rm_rv_disc_mtd < 0 ? '('.ribuan($rm_rv_disc_mtd).')' : ribuan($rm_rv_disc_mtd) }} {{ $rm_rv_disc_ytd < 0 ? '('.ribuan($rm_rv_disc_ytd).')' : ribuan($rm_rv_disc_ytd) }}
TOTAL ROOM REVENUE {{ (@$lodging_day) }} {{ (@$lodging_bdy) }} {{ ($lodging_vdy < 0 ? '('.(@$lodging_vdy *-1).')' : (@$lodging_vdy)) }} {{ (@$lodging_mtd) }} {{ (@$lodging_bud) }} {{ ($lodging_var < 0 ? '('.(@$lodging_var *-1).')' : (@$lodging_var)) }} {{ (@$lodging_ytd) }}
 
Food {{"F&B"}}
B'fast Restaurant (Room) {{ ($b_fast_today) }} {{ ($b_fast_tbdgt) }} {{ ($b_fast_today - $b_fast_tbdgt < 0 ? '('.(($b_fast_today - $b_fast_tbdgt) *-1).')' : ($b_fast_today - $b_fast_tbdgt)) }} {{ ($b_fast_mtd) }} {{ ($b_fast_bdgtmtd) }} {{ $b_fast_mtd - $b_fast_bdgtmtd < 0 ? '('.(($b_fast_mtd - $b_fast_bdgtmtd) *-1).')' : ($b_fast_mtd - $b_fast_bdgtmtd) }} {{ ($b_fast_ytd) }}
  {{$title}}
{{-- @if($shop_stat->tipe) {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @else - {{@$shop_stat->shop->nama}} @endif --}} @if($shop_stat->tipe) {{-- {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} --}} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @else - {{@$shop_stat->tipe->nama_tipe}} @endif {{ ($this_today) }} {{ ($shop_stat->budget) }} {{ ($this_today - $shop_stat->budget < 0 ? '('.(($this_today - $shop_stat->budget) *-1).')' : ($this_today - $shop_stat->budget)) }} {{ ($this_mtd) }} {{ ($shop_stat->budget_mtd) }} {{ ($this_mtd - $shop_stat->budget_mtd < 0 ? '('.(($this_mtd - $shop_stat->budget_mtd) *-1).')' : ($this_mtd - $shop_stat->budget_mtd)) }} {{ ($this_ytd) }}
{{"Discount & Allowance"}} {{ ($food_discount_allowance*(1)) }} {{ '-' }} {{ '('.($food_discount_allowance*(1)).')' }} {{ ($food_discount_allowance_mtd*(1)) }} {{ '-' }} {{ '('.($food_discount_allowance_mtd*(1)).')' }} {{ ($food_discount_allowance_ytd*(1)) }}
TOTAL FOOD {{'F&B'}} {{ ($total_food) }} {{ ($total_food_budget) }} {{ ($total_food_variance_today < 0 ? '('.($total_food_variance_today *-1).')' : ($total_food_variance_today)) }} {{ ($total_food_mtd) }} {{ ($total_food_budget_mtd) }} {{ ($total_food_variance_mtd < 0 ? '('.($total_food_variance_mtd *-1).')' : ($total_food_variance_mtd)) }} {{ ($total_food_ytd) }}
Beverages {{"F&B"}}
  {{$title}}
{{-- @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @else - {{@$shop_stat->shop->nama}} @endif --}} @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{-- {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} --}} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @else - {{@$shop_stat->tipe->nama_tipe}} @endif {{ ($this_today) }} {{ ($shop_stat->budget) }} {{ ($this_today - $shop_stat->budget < 0 ? '('.(($this_today - $shop_stat->budget) *-1).')' : ($this_today - $shop_stat->budget)) }} {{ ($this_mtd) }} {{ ($shop_stat->budget_mtd) }} {{ ($this_mtd - $shop_stat->budget_mtd < 0 ? '('.(($this_mtd - $shop_stat->budget_mtd) *-1).')' : ($this_mtd - $shop_stat->budget_mtd)) }} {{ ($this_ytd) }}
{{"Discount & Allowance"}} {{ '('.($beverages_discount_allowance*(1)).')' }} {{ '-' }} {{ '('.($beverages_discount_allowance*(1)).')' }} {{ '('.($beverages_discount_allowance_mtd*(1)).')' }} {{ '-' }} {{ '('.($beverages_discount_allowance_mtd*(1)).')' }} {{ '('.($beverages_discount_allowance_ytd*(1)).')' }}
TOTAL BEVERAGES {{'F&B'}} {{ ($total_beverages) }} {{ ($total_beverages_budget) }} {{ ($total_beverages_variance_today < 0 ? '('.($total_beverages_variance_today *-1).')' : ($total_beverages_variance_today)) }} {{ ($total_beverages_mtd) }} {{ ($total_beverages_budget_mtd) }} {{ ($total_beverages_variance_mtd < 0 ? '('.($total_beverages_variance_mtd *-1).')' : ($total_beverages_variance_mtd)) }} {{ ($total_beverages_ytd) }}
Other {{'F&B'}}
  {{$title}}
{{-- @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @else - {{@$shop_stat->shop->nama}} @endif --}} @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{-- {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} --}} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @else - {{@$shop_stat->tipe->nama_tipe}} @endif {{ ($this_today) }} {{ ($shop_stat->budget) }} {{ ($this_today - $shop_stat->budget < 0 ? '('.(($this_today - $shop_stat->budget) *-1).')' : ($this_today - $shop_stat->budget)) }} {{ ($this_mtd) }} {{ ($shop_stat->budget_mtd) }} {{ ($this_mtd - $shop_stat->budget_mtd < 0 ? '('.(($this_mtd - $shop_stat->budget_mtd) *-1).')' : ($this_mtd - $shop_stat->budget_mtd)) }} {{ ($this_ytd) }}
Discount & Allowance {{ (0) }} {{ (0) }} {{ (0) }} {{ (0) }} {{ (0) }} {{ (0) }} {{ (0) }}
  {{$title}}
{{-- @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->shop ? @$shop_stat->shop->nama : '' }} @else - {{@$shop_stat->shop->nama}} @endif --}} @if($shop_stat->tipe) @if ($shop_stat->tipe->type_category_id != null) {{-- {{ config('custom.jenis_tipe_item')[@$shop_stat->tipe->type_category_id] }} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} --}} {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @endif @elseif($shop_stat->tipe_menu_id===0) Custom Menu {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @elseif(!$shop_stat->tipe_menu_id) Discount {{ @$shop_stat->tipe ? @$shop_stat->tipe->nama_tipe : '' }} @else - {{@$shop_stat->tipe->nama_tipe}} @endif {{ ($this_today) }} {{ ($shop_stat->budget) }} {{ ($this_today - $shop_stat->budget < 0 ? '('.(($this_today - $shop_stat->budget) *-1).')' : ($this_today - $shop_stat->budget)) }} {{ ($this_mtd) }} {{ ($shop_stat->budget_mtd) }} {{ ($this_mtd - $shop_stat->budget_mtd < 0 ? '('.(($this_mtd - $shop_stat->budget_mtd) *-1).')' : ($this_mtd - $shop_stat->budget_mtd)) }} {{ ($this_ytd) }}
{{"Discount & Allowance"}} {{ '('.($other_discount_allowance*(1)).')' }} {{ '-' }} {{ '('.($other_discount_allowance*(1)).')' }} {{ '('.($other_discount_allowance_mtd*(1)).')' }} {{ '-' }} {{ '('.($other_discount_allowance_mtd*(1)).')' }} {{ '('.($other_discount_allowance_ytd*(1)).')' }}
TOTAL OTHER {{"F&B"}} {{ ($total_other_fb) }} {{ ($total_other_fb_budget) }} {{ ($total_other_fb_variance_today < 0 ? '('.($total_other_fb_variance_today *-1).')' : ($total_other_fb_variance_today)) }} {{ ($total_other_fb_mtd) }} {{ ($total_other_fb_budget_mtd) }} {{ ($total_other_fb_variance_mtd < 0 ? '('.($total_other_fb_variance_mtd *-1).')' : ($total_other_fb_variance_mtd)) }} {{ ($total_other_fb_ytd) }}
TOTAL {{"F&B"}} REVENUE {{ ($total_today) }} {{ ($total_budget_day) }} {{ $total_variance_day < 0 ? '('.($total_variance_day).')' : $total_variance_day }} {{ ($total_mtd) }} {{ ($total_budget_mtd) }} {{ $total_variance_mtd < 0 ? '('.($total_variance_mtd).')' : $total_variance_mtd }} {{ ($total_ytd) }}
Other Revenue
{{ @$shop_stat->tipe->nama_tipe }} {{ @$shop_stat->shop ? "(".@$shop_stat->shop->nama.")" : '' }} {{ ($this_today) }} {{ ($shop_stat->budget) }} {{ ($this_today - $shop_stat->budget < 0 ? '('.($this_today - $shop_stat->budget).')' : ($this_today - $shop_stat->budget)) }} {{ ($this_mtd) }} {{ ($shop_stat->budget_mtd) }} {{ ($this_mtd - $shop_stat->budget_mtd < 0 ? '('.($this_mtd - $shop_stat->budget_mtd).')' : ($this_mtd - $shop_stat->budget_mtd)) }} {{ ($this_ytd) }}
TOTAL OTHER REVENUE {{ ($other_total_today) }} {{ ($other_total_budget_day) }} {{ ($other_total_variance_day < 0 ? '('.($other_total_variance_day *-1).')' : ($other_total_variance_day)) }} {{ ($other_total_mtd) }} {{ ($other_total_budget_mtd) }} {{ ($other_total_variance_mtd < 0 ? '('.($other_total_variance_day *-1).')' : ($other_total_variance_mtd)) }} {{ ($other_total_ytd) }}
TOTAL NET REVENUE {{ ($gtotal_today) }} {{ ($gtotal_budget_day) }} {{ ($gtotal_variance_day < 0 ? '('.($gtotal_variance_day *-1).')' : ($gtotal_variance_day)) }} {{ ($gtotal_mtd) }} {{ ($gtotal_budget_mtd) }} {{ ($gtotal_variance_mtd < 0 ? '('.($gtotal_variance_mtd *-1).')' : ($gtotal_variance_mtd)) }} {{ ($gtotal_ytd) }}
Service Charge {{ ($serv_today) }} {{ ($serv_budget) }} {{ ($serv_today - $serv_budget < 0 ? '('.(($serv_variance = $serv_today - $serv_budget) *-1).')' : ($serv_variance = $serv_today - $serv_budget)) }} {{ ($serv_mtd) }} {{ ($serv_mtd_budget) }} {{ ($serv_mtd - $serv_mtd_budget < 0 ? '('.(($serv_mtd_variance = $serv_mtd - $serv_mtd_budget) *-1).')' : ($serv_mtd_variance = $serv_mtd - $serv_mtd_budget)) }} {{ ($serv_ytd) }}
Government Tax {{ ($tax_today) }} {{ ($tax_budget) }} {{ ($tax_today - $tax_budget < 0 ? '('.(($tax_variance = $tax_today - $tax_budget) *-1).')' : ($tax_variance = $tax_today - $tax_budget)) }} {{ ($tax_mtd) }} {{ ($tax_mtd_budget) }} {{ ($tax_mtd - $tax_mtd_budget < 0 ? '('.(($tax_mtd_variance = $tax_mtd - $tax_mtd_budget) *-1).')' : ($tax_mtd_variance = $tax_mtd - $tax_mtd_budget)) }} {{ ($tax_ytd) }}
TOTAL GROSS REVENUE {{-- @php $today_guest_ledger += $gtotal_today+$serv_today+$tax_today @endphp --}} {{ ($gtotal_today+$serv_today+$tax_today) }} {{ ($gtotal_budget_day+$serv_budget+$tax_budget) }} {{ ($gtotal_variance_day+$serv_variance+$tax_variance < 0 ? '('.(($gtotal_variance_day+$serv_variance+$tax_variance) *-1).')' : ($gtotal_variance_day+$serv_variance+$tax_variance)) }} {{ ($gtotal_mtd+$serv_mtd+$tax_mtd) }} {{ ($gtotal_budget_mtd+$serv_mtd_budget+$tax_mtd_budget) }} {{ ($gtotal_variance_mtd+$serv_mtd_variance+$tax_mtd_variance < 0 ? '('.(($gtotal_variance_mtd+$serv_mtd_variance+$tax_mtd_variance) *-1).')' : ($gtotal_variance_mtd+$serv_mtd_variance+$tax_mtd_variance)) }} {{ ($gtotal_ytd+$serv_ytd+$tax_ytd) }}

@php $total_pay_tdy = $total_pay_mtd = $total_pay_ytd = 0; $total_bpay_tdy = $total_bpay_mtd = 0; $total_tdy_var = $total_mtd_var = 0; @endphp {{-- @foreach ($payable_stats as $pay) --}} {{-- @foreach ($payable_stats_new as $pay) --}} {{-- @foreach ($payable_per_shops as $pay) --}} @foreach ($payable_stats_2 as $pay) @php // skip yang data kosong if ($pay->payable === 0 && $pay->mtd_pay === 0 && $pay->ytd_pay === 0) { continue; } $this_pay_tdy = $pay->payable - @$pay->tax - @$pay->services; $this_pay_mtd = $pay->mtd_pay - @$pay->tax_mtd - @$pay->services_mtd; $this_pay_ytd = $pay->ytd_pay - @$pay->tax_ytd - @$pay->services_ytd; // pay $total_pay_tdy += $this_pay_tdy; $total_pay_mtd += $this_pay_mtd; $total_pay_ytd += $this_pay_ytd; // budget $total_bpay_tdy += $pay->budget; $total_bpay_mtd += $pay->budget_mtd; // variance $total_tdy_var += ($pay->payable - $pay->budget); $total_mtd_var += ($pay->mtd_pay - $pay->budget_mtd); @endphp {{-- --}} @endforeach
DESCRIPTION TODAY MONTH TO DATE YTD
TODAY BUDGET VARIANCE MTD BUDGET VARIANCE
({{@$pay->tipeMenu->shop->nama}}) {{$pay->label ?? ' payable '}}   {{@$pay->tipeMenu->revenue_partner_label}} {{ ($this_pay_tdy) }} {{ ($pay->budget) }} {{ ($this_pay_tdy - $pay->budget < 0 ? '('. (($this_pay_tdy - $pay->budget) *-1).')' : ($this_pay_tdy - $pay->budget)) }} {{ ($this_pay_mtd) }} {{ ($pay->budget_mtd) }} {{ ($this_pay_mtd - $pay->budget_mtd < 0 ? '('.(($this_pay_mtd - $pay->budget_mtd) *-1).')' : ($this_pay_mtd - $pay->budget_mtd)) }} {{ ($this_pay_ytd) }}
TOTAL PAYABLE {{-- @php $today_guest_ledger += $total_pay_tdy; @endphp --}} {{ ($total_pay_tdy) }} {{ ($total_bpay_tdy) }} {{ ($total_tdy_var < 0 ? '('.($total_tdy_var *-1).')' : ($total_tdy_var)) }} {{ ($total_pay_mtd) }} {{ ($total_bpay_mtd) }} {{ ($total_mtd_var < 0 ? '('.($total_mtd_var *-1).')' : ($total_mtd_var)) }} {{ ($total_pay_ytd) }}

{{-- --}} @php $total_cash_today = 0; $total_cash_mtd = 0; $total_cash_ytd = 0; @endphp @foreach(config('custom.jenis_cash') as $key => $jenis_cash) @php $total_cash_today += $cash_today[$key]; $total_cash_mtd += $cash_mtd[$key]; $total_cash_ytd += $cash_ytd[$key]; @endphp @endforeach @php $total_credit_card_today = 0; $total_credit_card_mtd = 0; $total_credit_card_ytd = 0; @endphp @foreach($platform_headers as $platform_header) @php $cc_today = array_key_exists('1_'.$platform_header->id, $credit_card_today) ? array_sum($credit_card_today['1_'.$platform_header->id]) : 0; $cc_mtd = array_key_exists('1_'.$platform_header->id, $credit_card_mtd) ? array_sum($credit_card_mtd['1_'.$platform_header->id]) : 0; $cc_ytd = array_key_exists('1_'.$platform_header->id, $credit_card_ytd) ? array_sum($credit_card_ytd['1_'.$platform_header->id]) : 0; @endphp @php $total_credit_card_today += $cc_today; $total_credit_card_mtd += $cc_mtd; $total_credit_card_ytd += $cc_ytd; @endphp @endforeach @foreach($platforms as $platform) @php $cc_today = array_key_exists('2_'.$platform->id, $credit_card_today) ? array_sum($credit_card_today['2_'.$platform->id]) : 0; $cc_mtd = array_key_exists('2_'.$platform->id, $credit_card_mtd) ? array_sum($credit_card_mtd['2_'.$platform->id]) : 0; $cc_ytd = array_key_exists('2_'.$platform->id, $credit_card_ytd) ? array_sum($credit_card_ytd['2_'.$platform->id]) : 0; @endphp @php $total_credit_card_today += $cc_today; $total_credit_card_mtd += $cc_mtd; $total_credit_card_ytd += $cc_ytd; @endphp @endforeach @php $cc_today = array_key_exists('3_', $credit_card_today) ? array_sum($credit_card_today['3_']) : 0; $cc_mtd = array_key_exists('3_', $credit_card_mtd) ? array_sum($credit_card_mtd['3_']) : 0; $cc_ytd = array_key_exists('3_', $credit_card_ytd) ? array_sum($credit_card_ytd['3_']) : 0; @endphp {{-- --}} {{-- @php $total_credit_card_today += $cc_today; $total_credit_card_mtd += $cc_mtd; $total_credit_card_ytd += $cc_ytd; @endphp --}} @php $total_today_cl = 0; $total_mtd_cl = 0; $total_ytd_cl = 0; @endphp @foreach($other_city_ledgers as $other_city_ledger) @php $today_cl = isset($today_other_city_ledgers[$other_city_ledger->id]) ? $today_other_city_ledgers[$other_city_ledger->id]->total_ledger : 0; $mtd_cl = isset($mtd_other_city_ledgers[$other_city_ledger->id]) ? $mtd_other_city_ledgers[$other_city_ledger->id]->total_ledger : 0; $ytd_cl = isset($ytd_other_city_ledgers[$other_city_ledger->id]) ? $ytd_other_city_ledgers[$other_city_ledger->id]->total_ledger : 0; @endphp @php $total_today_cl += $today_cl; $total_mtd_cl += $mtd_cl; $total_ytd_cl += $ytd_cl; @endphp @endforeach @foreach(config('custom.segment_ratecodes') as $key => $segment_ratecode) @if(in_array($key, [1,7,10,11,12,13])) @php continue; @endphp @endif @php $today_cl = isset($today_city_ledgers[$key]) ? $today_city_ledgers[$key]->total_ledger : 0; $mtd_cl = isset($mtd_city_ledgers[$key]) ? $mtd_city_ledgers[$key]->total_ledger : 0; $ytd_cl = isset($ytd_city_ledgers[$key]) ? $ytd_city_ledgers[$key]->total_ledger : 0; @endphp @php $total_today_cl += $today_cl; $total_mtd_cl += $mtd_cl; $total_ytd_cl += $ytd_cl; @endphp @endforeach @php $total_today_payment = $advance_deposit_today + $total_cash_today + $total_credit_card_today + $total_today_cl; $total_mtd_payment = $advance_deposit_mtd + $total_cash_mtd + $total_credit_card_mtd + $total_mtd_cl; $total_ytd_payment = $advance_deposit_ytd + $total_cash_ytd + $total_credit_card_ytd + $total_ytd_cl; @endphp @php $paid_out_tdy = $paid_out_mtd = $paid_out_ytd = 0;// defining @endphp @foreach($paid_out_datas as $paid) @php $paid_out_tdy += $paid->today*-1;// total tdy $paid_out_mtd = ($paid->mtd)*-1; // total mtd $paid_out_ytd = ($paid->ytd)*-1; // total ytd @endphp @endforeach @php // Total Cash Min paid Out $total_cash_today = $total_cash_today + $paid_out_tdy; // paid out sudah minus/negatif $total_cash_mtd = $total_cash_mtd + $paid_out_mtd; // paid out sudah minus/negatif $total_cash_ytd = $total_cash_ytd + $paid_out_ytd; // paid out sudah minus/negatif @endphp @php $paid_out_pos_tdy = $paid_out_pos_mtd = $paid_out_pos_ytd = 0;// defining @endphp @foreach($paid_out_pos_datas as $paid) @php $paid_out_pos_tdy = $paid->change_tdy*-1;// total tdy $paid_out_pos_mtd = ($paid->change_mtd)*-1; // total mtd $paid_out_pos_ytd = ($paid->change_ytd)*-1; // total ytd @endphp @endforeach @php // Total Cash Min paid Out $total_cash_today = $total_cash_today - $paid_out_pos_tdy; // paid out sudah minus/negatif $total_cash_mtd = $total_cash_mtd - $paid_out_pos_mtd; // paid out sudah minus/negatif $total_cash_ytd = $total_cash_ytd - $paid_out_pos_ytd; // paid out sudah minus/negatif @endphp @php $total_today_payment = $advance_deposit_today + $total_cash_today + $total_credit_card_today + $total_today_cl; $total_mtd_payment = $advance_deposit_mtd + $total_cash_mtd + $total_credit_card_mtd + $total_mtd_cl; $total_ytd_payment = $advance_deposit_ytd + $total_cash_ytd + $total_credit_card_ytd + $total_ytd_cl; @endphp
DESCRIPTION SUMMARY OF PAYMENT
TODAY MONTH TO DATE YTD
Advance Deposit {{ ($advance_deposit_today ? '('.$advance_deposit_today.')' : '-' ) }} {{ ($advance_deposit_mtd ? '('.$advance_deposit_mtd.')' : '-' ) }} {{ ($advance_deposit_ytd ? '('.$advance_deposit_ytd.')' : '-' ) }}
Total Deposit {{ ($advance_deposit_today ? '('.$advance_deposit_today.')' : '-' ) }} {{ ($advance_deposit_mtd ? '('.$advance_deposit_mtd.')' : '-' ) }} {{ ($advance_deposit_ytd ? '('.$advance_deposit_ytd.')' : '-' ) }}
{{ $jenis_cash }} {{ ($cash_today[$key] ? '('.$cash_today[$key].')' : '-' ) }} {{ ($cash_mtd[$key] ? '('.$cash_mtd[$key].')' : '-' ) }} {{ ($cash_ytd[$key] ? '('.$cash_ytd[$key].')' : '-' ) }}
Total Cash {{ ($total_cash_today ? '('.$total_cash_today.')' : '-' ) }} {{ ($total_cash_mtd ? '('.$total_cash_mtd.')' : '-' ) }} {{ ($total_cash_ytd ? '('.$total_cash_ytd.')' : '-' ) }}
{{$platform_header->name}} {{ ($cc_today ? '('.$cc_today.')' : '-' ) }} {{ ($cc_mtd ? '('.$cc_mtd.')' : '-' ) }} {{ ($cc_ytd ? '('.$cc_ytd.')' : '-' ) }}
{{$platform->nama}} {{ ($cc_today ? '('.$cc_today.')' : '-' ) }} {{ ($cc_mtd ? '('.$cc_mtd.')' : '-' ) }} {{ ($cc_ytd ? '('.$cc_ytd.')' : '-' ) }}
Bank Transfer {{ ($cc_today ? '('.$cc_today.')' : '-' ) }} {{ ($cc_mtd ? '('.$cc_mtd.')' : '-' ) }} {{ ($cc_ytd ? '('.$cc_ytd.')' : '-' ) }}
Total Credit Card {{ ($total_credit_card_today ? '('.$total_credit_card_today.')' : '-' ) }} {{ ($total_credit_card_mtd ? '('.$total_credit_card_mtd.')' : '-' ) }} {{ ($total_credit_card_ytd ? '('.$total_credit_card_ytd.')' : '-' ) }}
{{ $other_city_ledger->name }} {{ ($today_cl ? '('.$today_cl.')' : '-' ) }} {{ ($mtd_cl ? '('.$mtd_cl.')' : '-' ) }} {{ ($ytd_cl ? '('.$ytd_cl.')' : '-' ) }}
{{ $segment_ratecode }} {{in_array($key,[14,15]) ? '' : 'Ledger'}} {{ ($today_cl ? '('.$today_cl.')' : '-' ) }} {{ ($mtd_cl ? '('.$mtd_cl.')' : '-' ) }} {{ ($ytd_cl ? '('.$ytd_cl.')' : '-' ) }}
Total City Ledger {{ ($total_today_cl ? '('.$total_today_cl.')' : '-' ) }} {{ ($total_mtd_cl ? '('.$total_mtd_cl.')' : '-' ) }} {{ ($total_ytd_cl ? '('.$total_ytd_cl.')' : '-' ) }}
TOTAL PAYMENT @php // $today_guest_ledger -= $total_today_payment; @endphp {{ ($total_today_payment ? '('.$total_today_payment.')' : '-' ) }} {{ ($total_mtd_payment ? '('.$total_mtd_payment.')' : '-' ) }} {{ ($total_ytd_payment ? '('.$total_ytd_payment.')' : '-' ) }}
Paid Out {{ ($paid_out_tdy ? '('.$paid_out_tdy.')' : '-' ) }} {{ ($paid_out_mtd ? '('.$paid_out_mtd.')' : '-' ) }} {{ ($paid_out_ytd ? '('.$paid_out_ytd.')' : '-' ) }}
Paid Out POS {{ $paid_out_pos_tdy ? '('.number_format($paid_out_pos_tdy*-1, 2, '.', ',').')' : '-'}} {{ $paid_out_pos_mtd ? '('.number_format($paid_out_pos_mtd*-1, 2, '.', ',').')' : '-'}} {{ $paid_out_pos_ytd ? '('.number_format($paid_out_pos_ytd*-1, 2, '.', ',').')' : '-'}}
TOTAL PAYMENT @php // $today_guest_ledger -= $total_today_payment; @endphp {{ ($total_today_payment ? '('.$total_today_payment.')' : '-' ) }} {{ ($total_mtd_payment ? '('.$total_mtd_payment.')' : '-' ) }} {{ ($total_ytd_payment ? '('.$total_ytd_payment.')' : '-' ) }}

Guest Ledger as Date TODAY MONTH TO DATE YTD
{{ $new_gl_tdy ? ($new_gl_tdy) : '-'}} {{ $new_gl_mtd ? ($new_gl_mtd) : '-'}} {{ $new_gl_ytd ? ($new_gl_ytd) : '-'}}

GUEST LEDGER
Today Guest Ledger {{ ($today_guest_ledger ) }}
Yesterday Guest Ledger {{ ($yesterday_guest_ledger ) }}
TODAY BALANCE @php $today_balance_guest_ledger = $today_guest_ledger + $yesterday_guest_ledger; @endphp {{ ($today_balance_guest_ledger) }}