@php use App\Models\SPPMO\Constants; $ttotal = 0; $is_cathead = true; $cur_categoryhead = null; $cur_qtr = null; $grand_total = 0; $grand_total_mooe = 0; $grand_total_co = 0; $total = 0; $total_mooe = 0; $total_co = 0; $infra_total = []; $total_cw_mooe = 0; $total_cw_co = 0; @endphp APP for {{ $data['year'] }}
@if(!is_null($data['date_covered']))
Date Covered: {{$data['date_covered'][0]}} - {{$data['date_covered'][1]}}
@else
Date Covered: As of {{date('Y-m-d H:i:s')}}
@endif
Page {PAGENO} of {nbpg}
Date Generated: @php echo date('Y-m-d H:i:s') @endphp
@if ($data["barcode"])
@endif
Republic of the Philippines
VISAYAS STATE UNIVERSITY
Visca, Baybay City, Leyte
{{ $data["ppmp_for"] }} Annual Procurement Plan (APP) for FY {{ $data['year'] }}
In Thousand Pesos
@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) @php $is_cathead = false; @endphp @endif @if($key == 0 || ($details['categoryhead'] == $cur_categoryhead)) @php $split_str = explode('-',$details['funding']); $total = $total + $details['total']; @endphp @if(array_key_exists((1), $split_str)) @if($split_str[1] == 'MOOE') @php $total_mooe = $total_mooe + $details['total']; @endphp @else @php $total_co = $total_co + $details['total']; @endphp @endif @else @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 @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))--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @php--}} {{-- $split_str = explode('-',$details['funding']);--}} {{-- $total = $total + $details['total'];--}} {{-- @endphp--}} {{-- @if(array_key_exists((1), $split_str))--}} {{-- @if($split_str[1] == 'MOOE')--}} {{-- --}} {{-- --}} {{-- @php--}} {{-- $total_mooe = $total_mooe + $details['total'];--}} {{-- @endphp--}} {{-- @else--}} {{-- --}} {{-- --}} {{-- @php--}} {{-- $total_co = $total_co + $details['total'];--}} {{-- @endphp--}} {{-- @endif--}} {{-- @else--}} {{-- --}} {{-- --}} {{-- @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--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @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 @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 @foreach($data['civilworks1'] as $cw_item) @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') @php $total_cw_mooe = $total_cw_mooe + $cw_item->total_cost; @endphp @else @php $total_cw_co = $total_cw_co + $cw_item->total_cost; @endphp @endif @else @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) @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') @php $total_cw_mooe = $total_cw_mooe + $cw_item->total_cost; @endphp @else @php $total_cw_co = $total_cw_co + $cw_item->total_cost; @endphp @endif @else @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) @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') @php $total_cw_mooe = $total_cw_mooe + $cw_item->total_cost; @endphp @else @php $total_cw_co = $total_cw_co + $cw_item->total_cost; @endphp @endif @else @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) @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') @php $total_cw_mooe = $total_cw_mooe + $cw_item->total_cost; @endphp @else @php $total_cw_co = $total_cw_co + $cw_item->total_cost; @endphp @endif @else @php $total_cw_mooe = $total_cw_mooe + $cw_item->total_cost; @endphp @endif @php array_push($infra_total, $cw_item->total_cost); @endphp @endforeach @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
Code (PAP) Procurement Program/Project PMO/
EndUser
Mode of Procurement Schedule of Each Procurement Activity Source of funds Estimated Budget (PhP) Remarks()
Ads/Post of IEI/REI Sub/Open of Bids Notice of Awards Contract Signing Total MOOE CO
{{ $details['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) }}₱ {{ number_format($details['total'],2) }} ₱ {{ number_format($details['total'],2) }}₱ {{ number_format($details['total'],2) }}
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
{{ $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) }}₱ {{ number_format($details['total'],2) }} ₱ {{ number_format($details['total'],2) }}₱ {{ number_format($details['total'],2) }}
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--}} {{--
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
Infrastructure
{{ $cw_item->project_code }} {{ $cw_item->fund_source }} {{ $cw_item->mode }} 1st Quarter GoP ₱ {{ number_format($cw_item->total_cost, 2) }} ₱ {{ number_format($cw_item->total_cost,2) }} ₱ {{ number_format($cw_item->total_cost,2) }}₱ {{ number_format($cw_item->total_cost,2) }}
{{ $cw_item->project_code }} {{ $cw_item->fund_source }} {{ $cw_item->mode }} 2nd Quarter GoP ₱ {{ number_format($cw_item->total_cost, 2) }} ₱ {{ number_format($cw_item->total_cost,2) }} ₱ {{ number_format($cw_item->total_cost,2) }}₱ {{ number_format($cw_item->total_cost,2) }}
{{ $cw_item->project_code }} {{ $cw_item->fund_source }} {{ $cw_item->mode }} 3rd Quarter GoP ₱ {{ number_format($cw_item->total_cost, 2) }} ₱ {{ number_format($cw_item->total_cost,2) }} ₱ {{ number_format($cw_item->total_cost,2) }}₱ {{ number_format($cw_item->total_cost,2) }}
{{ $cw_item->project_code }} {{ $cw_item->fund_source }} {{ $cw_item->mode }} 4th Quarter GoP ₱ {{ number_format($cw_item->total_cost, 2) }} ₱ {{ number_format($cw_item->total_cost,2) }} ₱ {{ number_format($cw_item->total_cost,2) }}₱ {{ number_format($cw_item->total_cost,2) }}
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
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
PREPARED BY: ________________________
  {{strtoupper($data['prepared_by'])}}
Member, BAC Secretariat
APPROVED: _______________________
  {{ strtoupper($data['president']->president) }}
President
RECOMMENDING APPROVAL: _______________________
  {{strtoupper($data['bac_chairman'])}}
Unit Head/Project Leader