| Total |
MOOE |
CO |
@foreach($data['app'] as $key => $details)
@php
if(is_null($cur_categoryhead)) {
$cur_categoryhead = $details['categoryhead'];
$total = 0;
$total_mooe = 0;
$total_co = 0;
}
@endphp
@if($is_cathead)
|
{{ $details['categoryhead'] }} |
|
|
|
|
|
|
|
|
@php
$is_cathead = false;
@endphp
@endif
@if($key == 0 || ($details['categoryhead'] == $cur_categoryhead))
| {{ $details['code_pap'] }} |
{{ $details['categoryhead'] }} |
{{ $details['funding'] }} |
{{ $details['mode'] }} |
@switch($details['quarter'])
@case (1)
1st Quarter
@break
@case (2)
2nd Quarter
@break
@case (3)
3rd Quarter
@break
@default
4th Quarter
@break
@endswitch
|
GoP |
₱ {{ number_format($details['total'],2) }} |
@php
$split_str = explode('-',$details['funding']);
$total = $total + $details['total'];
@endphp
@if(array_key_exists((1), $split_str))
@if($split_str[1] == 'MOOE')
₱ {{ number_format($details['total'],2) }} |
|
@php
$total_mooe = $total_mooe + $details['total'];
@endphp
@else
|
₱ {{ number_format($details['total'],2) }} |
@php
$total_co = $total_co + $details['total'];
@endphp
@endif
@else
₱ {{ number_format($details['total'],2) }} |
|
@php
$total_mooe = $total_mooe + $details['total'];
@endphp
@endif
|
@if(array_key_exists(($key + 1), $data['app']))
@if($details['categoryhead'] == $data['app'][$key+1]['categoryhead'])
@php
$cur_categoryhead = $details['categoryhead'];
@endphp
@else
@php
$is_cathead = true;
$cur_categoryhead = null;
@endphp
|
|
|
|
Total |
|
₱ {{ number_format($total , 2) }} |
@if($total_mooe > 0)
₱ {{ number_format($total_mooe , 2) }}
@endif
|
@if($total_co > 0)
₱ {{ number_format($total_co , 2) }}
@endif
|
|
@php
$grand_total = $grand_total + $total;
$grand_total_mooe = $grand_total_mooe + $total_mooe;
$grand_total_co = $grand_total_co + $total_co;
@endphp
@endif
@endif
{{-- @elseif(($details['categoryhead'] == $cur_categoryhead))--}}
{{-- --}}
{{-- | {{ $details['code_pap'] }} | --}}
{{-- {{ $details['categoryhead'] }} | --}}
{{-- {{ $details['funding'] }} | --}}
{{-- {{ $details['mode'] }} | --}}
{{-- --}}
{{-- @switch($details['quarter'])--}}
{{-- @case (1)--}}
{{-- 1st Quarter--}}
{{-- @break--}}
{{-- @case (2)--}}
{{-- 2nd Quarter--}}
{{-- @break--}}
{{-- @case (3)--}}
{{-- 3rd Quarter--}}
{{-- @break--}}
{{-- @default--}}
{{-- 4th Quarter--}}
{{-- @break--}}
{{-- @endswitch--}}
{{-- | --}}
{{-- GoP | --}}
{{-- ₱ {{ number_format($details['total'],2) }} | --}}
{{-- @php--}}
{{-- $split_str = explode('-',$details['funding']);--}}
{{-- $total = $total + $details['total'];--}}
{{-- @endphp--}}
{{-- @if(array_key_exists((1), $split_str))--}}
{{-- @if($split_str[1] == 'MOOE')--}}
{{-- ₱ {{ number_format($details['total'],2) }} | --}}
{{-- | --}}
{{-- @php--}}
{{-- $total_mooe = $total_mooe + $details['total'];--}}
{{-- @endphp--}}
{{-- @else--}}
{{-- | --}}
{{-- ₱ {{ number_format($details['total'],2) }} | --}}
{{-- @php--}}
{{-- $total_co = $total_co + $details['total'];--}}
{{-- @endphp--}}
{{-- @endif--}}
{{-- @else--}}
{{-- ₱ {{ number_format($details['total'],2) }} | --}}
{{-- | --}}
{{-- @php--}}
{{-- $total_mooe = $total_mooe + $details['total'];--}}
{{-- @endphp--}}
{{-- @endif--}}
{{-- | --}}
{{--
--}}
{{-- @if(array_key_exists(($key + 1), $data['app']))--}}
{{-- @if($details['categoryhead'] == $data['app'][$key+1]['categoryhead'])--}}
{{-- @php--}}
{{-- $cur_categoryhead = $details['categoryhead'];--}}
{{-- @endphp--}}
{{-- @else--}}
{{-- @php--}}
{{-- $is_cathead = true;--}}
{{-- $cur_categoryhead = null;--}}
{{-- @endphp--}}
{{-- --}}
{{-- | --}}
{{-- | --}}
{{-- | --}}
{{-- | --}}
{{-- Total | --}}
{{-- | --}}
{{-- ₱ {{ number_format($total , 2) }} | --}}
{{-- --}}
{{-- @if($total_mooe > 0)--}}
{{-- ₱ {{ number_format($total_mooe , 2) }}--}}
{{-- @endif--}}
{{-- | --}}
{{-- --}}
{{-- @if($total_co > 0)--}}
{{-- ₱ {{ number_format($total_co , 2) }}--}}
{{-- @endif--}}
{{-- | --}}
{{-- | --}}
{{--
--}}
{{-- @php--}}
{{-- $grand_total = $grand_total + $total;--}}
{{-- $grand_total_mooe = $grand_total_mooe + $total_mooe;--}}
{{-- $grand_total_co = $grand_total_co + $total_co;--}}
{{-- @endphp--}}
{{-- @endif--}}
{{-- @endif--}}
@endif
@endforeach
|
|
|
|
Total |
|
₱ {{ number_format($total , 2) }} |
@if($total_mooe > 0)
₱ {{ number_format($total_mooe , 2) }}
@endif
|
@if($total_co > 0)
₱ {{ number_format($total_co , 2) }}
@endif
|
|
@php
$grand_total = $grand_total + $total;
$grand_total_mooe = $grand_total_mooe + $total_mooe;
$grand_total_co = $grand_total_co + $total_co;
$sum = array_reduce($data['app'], function($i, $obj)
{
return $i += $obj['total'];
});
$total = 0;
@endphp
|
Infrastructure |
|
|
|
|
|
|
|
|
@foreach($data['civilworks1'] as $cw_item)
|
{{ $cw_item->project_code }} |
{{ $cw_item->fund_source }} |
{{ $cw_item->mode }}
|
1st Quarter |
GoP |
₱ {{ number_format($cw_item->total_cost, 2) }}
|
@php
$split_str = explode('-',$cw_item->fund_source);
$total = $total + $cw_item->total_cost;
@endphp
@if(array_key_exists((1), $split_str))
@if($split_str[1] == 'MOOE')
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@else
|
₱ {{ number_format($cw_item->total_cost,2) }} |
@php
$total_cw_co = $total_cw_co + $cw_item->total_cost;
@endphp
@endif
@else
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@endif
|
@php
array_push($infra_total, $cw_item->total_cost);
@endphp
@endforeach
@foreach($data['civilworks2'] as $cw_item)
|
{{ $cw_item->project_code }} |
{{ $cw_item->fund_source }} |
{{ $cw_item->mode }}
|
2nd Quarter |
GoP |
₱ {{ number_format($cw_item->total_cost, 2) }}
|
@php
$split_str = explode('-',$cw_item->fund_source);
$total = $total + $cw_item->total_cost;
@endphp
@if(array_key_exists((1), $split_str))
@if($split_str[1] == 'MOOE')
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@else
|
₱ {{ number_format($cw_item->total_cost,2) }} |
@php
$total_cw_co = $total_cw_co + $cw_item->total_cost;
@endphp
@endif
@else
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@endif
|
@php
array_push($infra_total, $cw_item->total_cost);
@endphp
@endforeach
@foreach($data['civilworks3'] as $cw_item)
|
{{ $cw_item->project_code }} |
{{ $cw_item->fund_source }} |
{{ $cw_item->mode }}
|
3rd Quarter |
GoP |
₱ {{ number_format($cw_item->total_cost, 2) }}
|
@php
$split_str = explode('-',$cw_item->fund_source);
$total = $total + $cw_item->total_cost;
@endphp
@if(array_key_exists((1), $split_str))
@if($split_str[1] == 'MOOE')
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@else
|
₱ {{ number_format($cw_item->total_cost,2) }} |
@php
$total_cw_co = $total_cw_co + $cw_item->total_cost;
@endphp
@endif
@else
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@endif
|
@php
array_push($infra_total, $cw_item->total_cost);
@endphp
@endforeach
@foreach($data['civilworks4'] as $cw_item)
|
{{ $cw_item->project_code }} |
{{ $cw_item->fund_source }} |
{{ $cw_item->mode }}
|
4th Quarter |
GoP |
₱ {{ number_format($cw_item->total_cost, 2) }}
|
@php
$split_str = explode('-',$cw_item->fund_source);
$total = $total + $cw_item->total_cost;
@endphp
@if(array_key_exists((1), $split_str))
@if($split_str[1] == 'MOOE')
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@else
|
₱ {{ number_format($cw_item->total_cost,2) }} |
@php
$total_cw_co = $total_cw_co + $cw_item->total_cost;
@endphp
@endif
@else
₱ {{ number_format($cw_item->total_cost,2) }} |
|
@php
$total_cw_mooe = $total_cw_mooe + $cw_item->total_cost;
@endphp
@endif
|
@php
array_push($infra_total, $cw_item->total_cost);
@endphp
@endforeach
|
|
|
|
Total |
|
₱ {{ number_format( array_sum($infra_total), 2) }} |
@if($total_cw_mooe > 0)
₱ {{ number_format($total_cw_mooe , 2) }}
@endif
|
@if($total_cw_co > 0)
₱ {{ number_format($total_cw_co , 2) }}
@endif
|
|
@php
$grand_total = $grand_total + array_sum($infra_total);
$grand_total_mooe = $grand_total_mooe + $total_cw_mooe;
$grand_total_co = $grand_total_co + $total_cw_co;
@endphp
|
|
|
|
Grand Total |
|
₱ {{ number_format(($sum + array_sum($infra_total)) , 2) }} |
@if($grand_total_mooe > 0)
₱ {{ number_format($grand_total_mooe , 2) }}
@endif
|
@if($grand_total_co > 0)
₱ {{ number_format($grand_total_co , 2) }}
@endif
|
|