{{-- Pksf Rows --}} @php $pksfLoopCounter = 0; @endphp @foreach ($d->pksf as $item) @php $pksfLoopCounter = ++$loop->index; @endphp @endforeach {{--Non Pksf Rows --}} @php $nonPksfLoopCounter = 0; @endphp @foreach ($d->nonPksf as $item) @php $nonPksfLoopCounter = ++$loop->index; @endphp @endforeach {{-- Other Rows --}} @php $otherLoopCounter = 0; @endphp @foreach ($d->other as $item) @php if($item == null) { continue; } $otherLoopCounter = ++$loop->index; @endphp @endforeach
SL# Name Designation Staff ID# Branch Permanent Date Name of the Project Total
{{ $pksfLoopCounter }} {{ $item->emp_name_english }} @php $position = $d->position->find($item->position_id_fk); if($position) { echo $position->name; } @endphp {{ $item->emp_id }} @php $branch = $d->branch->find($item->branch_id_fk); if($branch) { echo $branch->name; } @endphp {{ date('d-m-Y',strtotime($item->effect_month)) }} @php $projectType = $d->projectType->find($item->project_type_id_fk); if($projectType) { echo $projectType->name; } @endphp 1
Sub Total [ PKSF ] {{$pksfLoopCounter}}
""
{{ $nonPksfLoopCounter }} {{ $item->emp_name_english }} @php $position = $d->position->find($item->position_id_fk); if($position) { echo $position->name; } @endphp {{ $item->emp_id }} @php $branch = $d->branch->find($item->branch_id_fk); if($branch) { echo $branch->name; } @endphp {{ date('d-m-Y',strtotime($item->effect_month)) }} @php $projectType = $d->projectType->find($item->project_type_id_fk); if($projectType) { echo $projectType->name; } @endphp 1
Sub Total [ Non PKSF ] {{$nonPksfLoopCounter}}
Total MFP {{ $pksfLoopCounter + $nonPksfLoopCounter }}
""
{{ $otherLoopCounter }} {{ $item->emp_name_english }} @php $position = $d->position->find($item->position_id_fk); if($position) { echo $position->name; } @endphp {{ $item->emp_id }} @php $branch = $d->branch->find($item->branch_id_fk); if($branch) { echo $branch->name; } @endphp {{ date('d-m-Y',strtotime($item->effect_month)) }} @php $projectType = $d->projectType->find($item->project_type_id_fk); if($projectType) { echo $projectType->name; } @endphp 1
Sub Total [ Other ] {{$otherLoopCounter}}
Grand Total {{ $otherLoopCounter + $pksfLoopCounter + $nonPksfLoopCounter }}