@php $list = $data['list']; $signatory = $data['signatory']; $obligation_total = 0.00; $firstdata = []; $obligation = []; $grosstotal =0.00; $deductiontotal = 0.00; $grandtotal_deduciton = 0.00; $grandtotal = 0.00; $monthly =[]; $codes = [ '100000000' => 0.00, '302000000' => 0.00, '301000000' => 0.00, '303000000' => 0.00, '304000000' => 0.00, '200010000' => 0.00 ]; $code1 = 0; $code2 = 0; $code3 = 0; $code4 = 0; $code5 = 0; $code6 = 0; foreach ($list as $key => $newdata){ $firstdata = $newdata; break; } foreach ($list as $key => $data){ $monthly =[]; $total = 0.00; $first = \Carbon\Carbon::parse($data['effective_date'].'12:00:00'); $last = \Carbon\Carbon::parse($data['nosi_approve_date'].'12:00:00'); $i = $first->year; $ctn = 0; $level = 0; if(date('d',strtotime($first)) > 1){ $lastday = new DateTime($first); $lastday->modify('last day of this month'); $monthly[$ctn] = [date('M d',strtotime( $first->format('Y-m-d'))).' -'.date('d, Y',strtotime( $lastday->format('Y-m-d'))),$first->diffInDays($lastday),1]; $ctn++; $level++; } while ($i < $last->year) { if($level == 0){ $month = date('Y-m',strtotime($first)); $lastdate = \Carbon\Carbon::parse($i.'-12-31'); $test = \Carbon\Carbon::parse($first); }else { $month = date('Y-m',strtotime(' +1 months '. $first)); $lastdate = \Carbon\Carbon::parse($i.'-12-01'); $test = \Carbon\Carbon::parse($first); $level = 0; } $monthly[$ctn] = [((date('m',strtotime($month)) == 12)?'Dec':date('M',strtotime($month)).'- Dec').' 1-31, '.date('Y',strtotime($first)),31,$lastdate->diffInMonths($test) + 1]; $ctn++; $i++; $first = $i.'-01-01'; } $last = \Carbon\Carbon::parse($last); $test0 = \Carbon\Carbon::parse($first); $monthly[$ctn] = [((date('M',strtotime($first)) == date('M',strtotime( $last->format('Y-m'))))? '':date('M',strtotime($first)).'-').date('M',strtotime( $last->format('Y-m'))).' 1-'.date('d, Y',strtotime( $last->format('Y-m-d'))),31,$last->diffInMonths($test0) + 1]; $diff = $data['new_rate'] - $data['old_rate']; foreach ($monthly as $value){ $gross = ($diff/31)*$value[1]*$value[2]; $deduction = $gross * 0.09; $recieve = $gross - $deduction; $total += $recieve; $grandtotal_deduciton += $deduction; $deductiontotal += $deduction; $grosstotal +=$gross; $grandtotal +=$grosstotal; } if($data['personnel']['fund_source']['code'] == '100000000'){ $codes['100000000'] += $grosstotal; } if($data['personnel']['fund_source']['code'] == '302000000'){ $codes['302000000'] += $grosstotal; } if($data['personnel']['fund_source']['code'] == '301000000'){ $codes['301000000'] += $grosstotal; } if($data['personnel']['fund_source']['code'] == '303000000'){ $codes['303000000'] += $grosstotal; } if($data['personnel']['fund_source']['code'] == '304000000'){ $codes['304000000'] += $grosstotal; } if($data['personnel']['fund_source']['code'] == '200010000'){ $codes['200010000'] += $grosstotal; } } @endphp
OBLIGATION REQUEST AND STATUS |
No.: PS | |||||
VISAYAS STATE UNIVERSITY |
Date: | |||||
Visca, Baybay City, Leyte |
Fund: | |||||
| Payee: | {{ $firstdata['personnel']['person_info']['realname'] }} | ETAL | ||||
| Office: | ||||||
| Address: | VSU-MAIN | |||||
Responsibility Center |
Particulars |
MFO/PAP |
UACS Code / Expenditure |
Amount |
||
|
SALARY DIFFERENTIAL for {{ date('M d',strtotime($first)) }} - {{ date('M d, Y',strtotime($last)) }} |
@foreach($codes as $key => $data)
@if($data > 0)
{{$key}} @endif @endforeach |
@foreach($codes as $key => $data)
@if($data > 0)
5010101001 @endif @endforeach |
@foreach($codes as $key => $data)
@if($data > 0)
{{ number_format((float)$data, 2, '.', ',')}} @endif @endforeach |
|||
| Total | {{number_format((float)$grandtotal, 2, '.', ',')}} | |||||
| A Certified: | Charges to appropration/allotment necessary, lawful and under my direct supervision and supporting documents valid, proper and legal |
B Certified: | Allotment available and obligated for the purpose/adjustment necessary as indicated above |
|||
| Signature: | Signature: | |||||
| Printed Name | {{strtoupper($signatory[0]['head']['realname'])}} | Printed Name | {{strtoupper($signatory[1]['head']['realname'])}} | |||
| Position: | Vice President for Admin. & Finance | Position: | ADMIN OFFICER V | |||
| Head, Budget Unit/Authorized Representative | ||||||
| Date: | Date: | |||||
| C | STATUS OF OBLIGATION |
|||||
| Reference | Amount | |||||
| Date | Particulars | ORS/JEV/RCI/RADAI No. | Obligation | Payment | Not Yet Due | Due and Demandable |
| Obligation | {{number_format((float)$grandtotal, 2, '.', ',')}} | {{number_format((float)$grandtotal, 2, '.', ',')}} | ||||
| Totals | ||||||