SL# Name of Employee Employee Id Designation Joining Date Resign Date Branch Name Opening Balance Current Period Deposit Current Period Refund Closing Balance {{-- under ob --}} Own Org. Int. Total {{-- under Currnt Period Deposit --}} Own Org. Int. Total {{-- under Currnt Period Refund --}} Own Org. Int. Total {{-- under closing balance --}} Own Org. Int. Total @php // ==Set Default value==// // // For ob $totalObPfOwn = 0; $totalObPfOrg = 0; $totalObPfInt = 0; $totalObPfTotal = 0; // For Current Recovery $totalCurrentRecoveryOwn = 0; $totalCurrentRecoveryOrg = 0; $totalCurrentRecoveryInt = 0; $totalCurrentRecoveryTotal = 0; // For Current Period Fefund $totalCurrentPeriodRefundOwn = 0.00; $totalCurrentPeriodRefundOrg = 0.00; $totalCurrentPeriodRefundInt = 0.00; $totalCurrentPeriodRefundTotal = 0.00; // For Closing Balance $totalCbOwn = 0; $totalCbOrg = 0; $totalCbInt = 0; $totalCbTotal = 0; $sl = 1; @endphp @foreach ($data['users'] as $user) @if( intval($user->cbTotal) != 0 || intval($user->obPfOwn) != 0 || intval($user->obPfOrg) != 0 || intval($user->obPfInterest) != 0 || intval($user->obPfTotal) != 0 || intval($user->ownCurrentRecovery) != 0 || intval($user->orgCurrentRecovery) != 0 || intval($user->intCurrentRecovery) != 0 || intval($user->totalCurrentRecovery) != 0 || intval($user->cpRefundEmpAmount) != 0 || intval($user->cpRefundOrgAmount) != 0 || intval($user->cpRefundIntAmount) != 0 || intval($user->cpRefundTotalAmount) != 0 || intval($user->cbOwn) != 0 || intval($user->cbOrg) != 0 || intval($user->cbInt) != 0 ) {{ $sl++ }} {{ $user->emp_name_english }} {{ $user->emp_id }} {{ $user->designation }} {{ date( 'd-m-Y', strtotime($user->joining_date) ) }} {{ ($user->terminate_resignation_date == null || $user->terminate_resignation_date == '' || $user->terminate_resignation_date == '0000-00-00' || $user->terminate_resignation_date > $data['endDate']) ? '' : date( 'd-m-Y', strtotime($user->terminate_resignation_date) ) }} {{ $user->branchName }} {{-- Under ob --}} @if($user->obPfOwn) {{ number_format($user->obPfOwn,2) }} @else 0.00 @endif @if($user->obPfOrg) {{ number_format($user->obPfOrg,2) }} @else 0.00 @endif @if($user->obPfInterest) {{ number_format($user->obPfInterest,2) }} @else 0.00 @endif {{ number_format($user->obPfTotal,2) ?? 0.00 }} @php $totalObPfOwn += $user->obPfOwn; $totalObPfOrg += $user->obPfOrg; $totalObPfInt += $user->obPfInterest; $totalObPfTotal += $user->obPfTotal; @endphp {{-- Under Current Period Recovery --}} @if($user->ownCurrentRecovery) {{ number_format($user->ownCurrentRecovery,2) }} @else 0.00 @endif @if($user->orgCurrentRecovery) {{ number_format($user->orgCurrentRecovery,2) }} @else 0.00 @endif @if($user->intCurrentRecovery) {{ number_format($user->intCurrentRecovery,2) }} @else 0.00 @endif @if($user->totalCurrentRecovery) {{ number_format($user->totalCurrentRecovery,2) }} @else 0.00 @endif @php $totalCurrentRecoveryOwn += $user->ownCurrentRecovery; $totalCurrentRecoveryOrg += $user->orgCurrentRecovery; $totalCurrentRecoveryInt += $user->intCurrentRecovery; $totalCurrentRecoveryTotal += $user->totalCurrentRecovery; @endphp {{-- Under Current Period Refund --}} @if($user->cpRefundEmpAmount) {{ number_format($user->cpRefundEmpAmount,2) }} @else 0.00 @endif @if($user->cpRefundOrgAmount) {{ number_format($user->cpRefundOrgAmount,2) }} @else 0.00 @endif @if($user->cpRefundIntAmount) {{ number_format($user->cpRefundIntAmount,2) }} @else 0.00 @endif @if($user->cpRefundTotalAmount) {{ number_format($user->cpRefundTotalAmount,2) }} @else 0.00 @endif @php $totalCurrentPeriodRefundOwn += $user->cpRefundEmpAmount; $totalCurrentPeriodRefundOrg += $user->cpRefundOrgAmount; $totalCurrentPeriodRefundInt += $user->cpRefundIntAmount; $totalCurrentPeriodRefundTotal += $user->cpRefundTotalAmount; @endphp {{-- Under closing balance --}} @if($user->cbOwn) {{ number_format($user->cbOwn,2) }} @else 0.00 @endif @if($user->cbOrg) {{ number_format($user->cbOrg,2) }} @else 0.00 @endif @if($user->cbInt) {{ number_format($user->cbInt,2) }} @else 0.00 @endif @if($user->cbTotal) {{ number_format($user->cbTotal,2) }} @else 0.00 @endif @php $totalCbOwn += $user->cbOwn; $totalCbOrg += $user->cbOrg; $totalCbInt += $user->cbInt; $totalCbTotal += $user->cbTotal; @endphp @endif @endforeach {{-- Table Footer --}} Total {{-- OB Total --}} @if($totalObPfOwn) {{ number_format($totalObPfOwn,2) }} @else 0.00 @endif @if($totalObPfOrg) {{ number_format($totalObPfOrg,2) }} @else 0.00 @endif @if($totalObPfInt) {{ number_format($totalObPfInt,2) }} @else 0.00 @endif @if($totalObPfTotal) {{ number_format($totalObPfTotal,2)}} @else 0.00 @endif {{-- Current Period Deposit Total --}} @if($totalCurrentRecoveryOwn) {{ number_format($totalCurrentRecoveryOwn,2) }} @else 0.00 @endif @if($totalCurrentRecoveryOrg) {{ number_format($totalCurrentRecoveryOrg,2) }} @else 0.00 @endif @if($totalCurrentRecoveryInt) {{ number_format($totalCurrentRecoveryInt,2) }} @else 0.00 @endif @if($totalCurrentRecoveryTotal) {{ number_format($totalCurrentRecoveryTotal,2) }} @else 0.00 @endif {{-- Current Period Refund total --}} @if($totalCurrentPeriodRefundOwn) {{ number_format($totalCurrentPeriodRefundOwn,2) }} @else 0.00 @endif @if($totalCurrentPeriodRefundOrg) {{ number_format($totalCurrentPeriodRefundOrg,2) }} @else 0.00 @endif @if($totalCurrentPeriodRefundInt) {{ number_format($totalCurrentPeriodRefundInt,2) }} @else 0.00 @endif @if($totalCurrentPeriodRefundTotal) {{ number_format($totalCurrentPeriodRefundTotal,2) }} @else 0.00 @endif {{-- Closing Balance Total --}} @if($totalCbOwn) {{ number_format($totalCbOwn,2) }} @else 0.00 @endif @if($totalCbOrg) {{ number_format($totalCbOrg,2) }} @else 0.00 @endif @if($totalCbInt) {{ number_format($totalCbInt,2) }} @else 0.00 @endif @if($totalCbTotal) {{ number_format($totalCbTotal,2) }} @else 0.00 @endif