@php $total_year_rev = 0; $total_year_cost = 0; $total_year_gross = 0; $total_year_exp = 0; $total_year_ebitda = 0; $total_year_non_op_exp = 0; $total_year_nett_profit = 0; @endphp

{{$title}}

Report Printed on: {{date('l, F d, Y')}}
  Period: {{$periode}}
@foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach {{-- NEW PENJABARAN HPP --}} @if (count($revenue_datas) > 0) @foreach ($revenue_datas as $item) @php $TCoaYear = 0; @endphp @foreach($periods as $period) @php $TCoaYear += array_key_exists($period, $item['value']) ? ($item['value'][$period]) : 0; @endphp @endforeach @endforeach @endif {{-- NEW PENJABARAN HPP --}} {{-- PENJABARAN HPP --}} {{-- @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach @foreach($periods as $period) @endforeach --}} {{-- PENJABARAN HPP --}} @foreach($periods as $period) {{-- --}} @php if (array_key_exists($period, $total_revenues)) { $total_year_rev += $total_revenues[$period]; } @endphp @endforeach @if (count($costs_datas) > 0) @foreach ($costs_datas as $item) @php $TCoaYear_exp = 0; @endphp 1 @foreach($periods as $period) @php $TCoaYear_exp += array_key_exists($period, $item['value']) ? ($item['value'][$period]) : 0; @endphp @endforeach @endforeach @endif @foreach($periods as $period) @php if (array_key_exists($period, $total_cost)) { $total_year_cost += $total_cost[$period]; } @endphp @endforeach @foreach($periods as $period) @php if (array_key_exists($period, $total_gross)) { $total_year_gross += $total_gross[$period]; } @endphp @endforeach {{-- PENJABARAN COST & EXPENSES --}} {{-- @if (count($cost_expenses) > 0) @foreach ($cost_expenses as $item) @foreach($periods as $period) @endforeach @endforeach @endif --}} {{-- PENJABARAN COST & EXPENSES --}} {{-- @foreach($periods as $period) --}} {{-- --}} {{-- @php if (array_key_exists($period, $total_expenses)) { $total_year_cost += $total_expenses[$period]; } @endphp @endforeach --}} @if (count($expense_datas) > 0) @foreach ($expense_datas as $item) @php $TCoaYear_exp = 0; @endphp @foreach($periods as $period) @php $TCoaYear_exp += array_key_exists($period, $item['value']) ? ($item['value'][$period]) : 0; @endphp @endforeach @endforeach @endif @foreach($periods as $period) {{-- --}} @php if (array_key_exists($period, $total_expenses)) { $total_year_exp += $total_expenses[$period]; } @endphp @endforeach @foreach($periods as $period) @php if (array_key_exists($period, $EBITDA)) { $total_year_ebitda += $EBITDA[$period]; } @endphp @endforeach @if (count($non_op_exps_datas) > 0) @foreach ($non_op_exps_datas as $item) @php $TCoaYear_exp = 0; @endphp @foreach($periods as $period) @php $TCoaYear_exp += array_key_exists($period, $item['value']) ? ($item['value'][$period]) : 0; @endphp @endforeach @endforeach @endif @foreach($periods as $period) @php if (array_key_exists($period, $total_non_operating_exp)) { $total_year_non_op_exp += $total_non_operating_exp[$period]; } @endphp @endforeach @foreach($periods as $period) @php if (array_key_exists($period, $total_nett_profit)) { $total_year_nett_profit += $total_nett_profit[$period]; } @endphp @endforeach {{-- @foreach($periods as $period) --}} {{-- --}} {{-- @endforeach @php $prof_loss_year = $total_year_rev - $total_year_cost; @endphp --}} {{-- --}}
 Description{{date('F, Y', strtotime(date('Y-d-m', strtotime('01/' . str_replace('-', '/', $period)))))}}Total Year
 
Summary
Revenue{{ array_key_exists($period, $total_revenues) ? number_format($total_revenues[$period], 2) : 0}}{{number_format($total_year_rev, 2)}}
Cost{{ array_key_exists($period, $total_cost) ? number_format($total_cost[$period], 2) : 0}}{{number_format($total_year_cost, 2)}}
Gross{{ array_key_exists($period, $total_gross) ? number_format($total_gross[$period], 2) : 0}}{{number_format($total_year_gross, 2)}}
Expenses{{ array_key_exists($period, $total_expenses) ? number_format($total_expenses[$period], 2) : 0}}{{number_format($total_year_exp, 2)}}
GOP{{ array_key_exists($period, $EBITDA) ? number_format($EBITDA[$period], 2) : 0}}{{number_format($total_year_ebitda, 2)}}
Non Operating Exp{{ array_key_exists($period, $total_non_operating_exp) ? number_format($total_non_operating_exp[$period], 2) : 0}}{{number_format($total_year_non_op_exp, 2)}}
Nett{{ array_key_exists($period, $total_nett_profit) ? number_format($total_nett_profit[$period], 2) : 0}}{{number_format($total_year_nett_profit, 2)}}
 
Revenue:
{{$item['description']}}{{ array_key_exists($period, $item['value']) ? number_format($item['value'][$period], 2) : 0}} {{number_format($TCoaYear, 2)}}
Room Revenue{{array_key_exists($period, $room_rev_total) ? number_format($room_rev_total[$period], 2) : ''}}
Food F&B{{array_key_exists($period, $fb_food_total) ? number_format($fb_food_total[$period], 2) : ''}}
Beverages F&B{{array_key_exists($period, $fb_bev_total) ? number_format($fb_bev_total[$period], 2) : ''}}
Other F&B{{array_key_exists($period, $fb_other_total) ? number_format($fb_other_total[$period], 2) : ''}}
Other Revenue{{ array_key_exists($period, $other_rev) ? number_format($other_rev[$period], 2) : ''}}
Total Revenue{{ array_key_exists($period, $pendapatan_usaha) ? number_format($pendapatan_usaha[$period], 2) : ''}}{{ array_key_exists($period, $total_revenues) ? number_format($total_revenues[$period], 2) : 0}}{{number_format($total_year_rev, 2)}}
              
Cost:
{{$item['description']}}{{ array_key_exists($period, $item['value']) ? number_format($item['value'][$period], 2) : 0}} {{number_format($TCoaYear_exp, 2)}}
Total Cost{{ array_key_exists($period, $total_cost) ? number_format($total_cost[$period], 2) : 0}}{{number_format($total_year_cost, 2)}}
Gross Profit{{ array_key_exists($period, $total_gross) ? number_format($total_gross[$period], 2) : 0}}{{number_format($total_year_gross, 2)}}
{{$item['description']}}{{ array_key_exists($period, $item['total']) ? number_format($item['total'][$period], 2) : ''}}
Total Cost & Expenses{{ array_key_exists($period, $total_exp_cost) ? number_format($total_exp_cost[$period], 2) : ''}}{{ array_key_exists($period, $total_expenses) ? number_format($total_expenses[$period], 2) : 0}}{{number_format($total_year_cost, 2)}}
              
Expense:
{{$item['description']}}{{ array_key_exists($period, $item['value']) ? number_format($item['value'][$period], 2) : 0}} {{number_format($TCoaYear_exp, 2)}}
Total Expenses{{ array_key_exists($period, $total_exp_cost) ? number_format($total_exp_cost[$period], 2) : ''}}{{ array_key_exists($period, $total_expenses) ? number_format($total_expenses[$period], 2) : 0}}{{number_format($total_year_exp, 2)}}
GOP(Gross Operational Expenses){{ array_key_exists($period, $EBITDA) ? number_format($EBITDA[$period], 2) : 0}}{{number_format($total_year_ebitda, 2)}}
              
Non Operating Exp:
{{$item['description']}}{{ array_key_exists($period, $item['value']) ? number_format($item['value'][$period], 2) : 0}} {{number_format($TCoaYear_exp, 2)}}
Total Non Operating Exp{{ array_key_exists($period, $total_non_operating_exp) ? number_format($total_non_operating_exp[$period], 2) : 0}}{{number_format($total_year_non_op_exp, 2)}}
              
Nett Profit{{ array_key_exists($period, $total_nett_profit) ? number_format($total_nett_profit[$period], 2) : 0}}{{number_format($total_year_nett_profit, 2)}}
Profit/Loss{{array_key_exists($period, $profit_or_loss) ? number_format($profit_or_loss[$period], 2) : ''}}{{array_key_exists($period, $profit_or_loss) ? number_format($profit_or_loss[$period], 2) : 0}}{{ number_format($prof_loss_year,0) }}