@php $cores = $data["list"]["cores"]; $functionals = $data["list"]["functional"]; $leaderships = $data["list"]["leadership"]; $ctr = 0; $sum = []; $divisor = []; @endphp Competency Assessment
G/F Administration Building
Visca, Baybay City, Leyte, 6521-A PHILIPPINES
Phone/Fax: +63 053 563 7643
Email Address: odahrd@vsu.edu.ph
Website: www.vsu.edu.ph

Name of Applicant:   {{ $data["applicant"] }}

Position applied for:  {{ $data["position"] }}

@foreach($data["list"]["committees"] as $commKey => $committee) @php $sum[$commKey] = 0; $divisor[$commKey] = 0; @endphp @endforeach @foreach($cores as $core) @foreach($core["points"] as $ckey => $point) @php $tempVal = (int)$point["value"]; $sum[$ckey] = $sum[$ckey] + $tempVal; if (!is_null($point["value"])) { $divisor[$ckey] = $divisor[$ckey] + 1; } @endphp @endforeach @endforeach @foreach($functionals as $functional) @foreach($functional["points"] as $fkey => $pointf) @php $tempVal = (int)$pointf["value"]; $sum[$fkey] = $sum[$fkey] + $tempVal; if (!is_null($pointf["value"])) { $divisor[$fkey] = $divisor[$fkey] + 1; } @endphp @endforeach @endforeach @foreach($leaderships as $leadership) @foreach($leadership["points"] as $lkey => $pointl) @php $tempVal = (int)$pointl["value"]; $sum[$lkey] = $sum[$lkey] + $tempVal; if (!is_null($pointl["value"])) { $divisor[$lkey] = $divisor[$lkey] + 1; } @endphp @endforeach @endforeach @foreach($data["list"]["committees"] as $comKey => $committee) @endforeach @foreach($data["list"]["committees"] as $comKeyy => $committee) @endforeach
Competencies Raters
{{ $committee }}
{!! ++$ctr . ". " . '' . $core["title"] . '' . ' - ' . $core["description"] . " - Level " . $core["level"] !!}{{ $point["value"] }}
{!! ++$ctr . ". " . '' . $functional["title"] . '' . ' - ' . $functional["description"] . " - Level " . $functional["level"] !!}{{ $pointf["value"] }}
{!! ++$ctr . ". " . '' . $leadership["title"] . '' . ' - ' . $leadership["description"] . " - Level " . $leadership["level"] !!}{{ $pointl["value"] }}
Total{{ $sum[$comKey] }}
Average{{ ($divisor[$comKeyy] > 0) ? number_format(round($sum[$comKeyy] / $divisor[$comKeyy], 2), 2) : "" }}