@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
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) }} |
@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) --}}
@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']) }} |
@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 --}}
{{'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"}} |
@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
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) }} |
@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
{{$title}} |
@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
{{-- @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) }} |
@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 --}}
{{"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)) }} |
@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
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"}} |
@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
{{$title}} |
@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
{{-- @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) }} |
@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 --}}
{{"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)).')' }} |
@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
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'}} |
|
|
|
|
|
|
|
@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 )
{{$title}} |
@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
{{-- @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) }} |
@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
Discount & Allowance
|
{{ (0) }} |
{{ (0) }} |
{{ (0) }} |
{{ (0) }} |
{{ (0) }} |
{{ (0) }} |
{{ (0) }} |
--}}
@endforeach
@endif
@if ($shop_statistics[99])
{{$title}} |
@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
{{-- @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) }} |
@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 --}}
{{"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)).')' }} |
@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
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) }} |
{{-- @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
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) }} |
@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
Other Revenue |
|
|
|
|
|
|
|
{{-- @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
{{ @$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) }} |
@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
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) }} |
@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
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 & Tax --}}
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) }} |