SL# Name of Employee Employee Id Designation Branch Name Account Information Opening Balance Current Period Deposit Current Period Refund Closing Balance {{-- Under account information --}} Openning Date {{-- Duration --}} Amount {{-- Under ob --}} Pri. Int. Total {{-- Under Currnt Period Recov --}} Pri. Int. Total {{-- Under Currnt Period Recov --}} Pri. Int. Total {{-- Under closing balance --}} Pri. Int. Total @php // Declare var for total calculation $totalObEps = 0; $totalObEpsInt = 0; $totalObEpsTotal = 0; $totalCurrentRecovery = 0; $totalCurrentRecoveryInt = 0; $totalCurrentRecoveryTotal = 0; $totalCpwOwn = 0; $totalCpwInt = 0; $totalCpwTotal = 0; $totalCb = 0; $totalCbInt = 0; $totalCbTotal = 0; @endphp @foreach ($data['users'] as $user) {{ ++$loop->index }} {{ $user->emp_name_english }} {{ $user->emp_id }} {{ $user->designation }} {{ $user->branchName }} {{-- under ob --}} @if($user->obEps) {{ number_format($user->obEps,2) }} @else - @endif @if($user->obEpsInt) {{ number_format($user->obEpsInt,2) }} @else - @endif @if($user->obEpsTotal) {{ number_format($user->obEpsTotal,2) }} @else - @endif @php $totalObEps += $user->obEps; $totalObEpsInt += $user->obEpsInt; $totalObEpsTotal += $user->obEpsTotal; @endphp {{-- under Currnt Period Recov --}} @if($user->cpRecovery) {{ number_format($user->cpRecovery,2) }} @else - @endif @if($user->cpRecoveryInt) {{ number_format($user->cpRecoveryInt,2) }} @else - @endif @if($user->cpRecoveryTotal) {{ number_format($user->cpRecoveryTotal,2) }} @else - @endif @php $totalCurrentRecovery += $user->cpRecovery; $totalCurrentRecoveryInt += $user->cpRecoveryInt; $totalCurrentRecoveryTotal += $user->cpRecoveryTotal; @endphp {{-- Under Current Period Recovery --}} @if($user->cpwEpsOwn) {{ number_format($user->cpwEpsOwn,2) }} @else - @endif @if($user->cpwEpsInt) {{ number_format($user->cpwEpsInt,2) }} @else - @endif @if($user->cpwEpsTotal) {{ number_format($user->cpwEpsTotal,2) }} @else - @endif @php $totalCpwOwn += $user->cpwEpsOwn; $totalCpwInt += $user->cpwEpsInt; $totalCpwTotal += $user->cpwEpsTotal; @endphp {{-- Under closing balance --}} @if($user->closingBalance) {{ number_format($user->closingBalance,2) }} @else - @endif @if($user->closingBalanceInt) {{ number_format($user->closingBalanceInt,2) }} @else - @endif @if($user->closingBalanceTotal) {{ number_format($user->closingBalanceTotal,2) }} @else - @endif @php $totalCb += $user->closingBalance; $totalCbInt += $user->closingBalanceInt; $totalCbTotal += $user->closingBalanceTotal; @endphp @endforeach {{-- Table Footer --}} Total @if($totalObEps) {{ number_format($totalObEps,2) }} @else - @endif @if($totalObEpsInt) {{ number_format($totalObEpsInt,2) }} @else - @endif @if($totalObEpsTotal) {{ number_format($totalObEpsTotal,2) }} @else - @endif @if($totalCurrentRecovery) {{ number_format($totalCurrentRecovery,2) }} @else - @endif @if($totalCurrentRecoveryInt) {{ number_format($totalCurrentRecoveryInt,2) }} @else - @endif @if($totalCurrentRecoveryTotal) {{ number_format($totalCurrentRecoveryTotal,2) }} @else - @endif {{-- Under Current Period Refund --}} @if($totalCpwOwn) {{ number_format($totalCpwOwn,2) }} @else - @endif @if($totalCpwInt) {{ number_format($totalCpwInt,2) }} @else - @endif @if($totalCpwTotal) {{ number_format($totalCpwTotal,2) }} @else - @endif {{-- Under Closing Balance --}} @if($totalCb) {{ number_format($totalCb,2) }} @else - @endif @if($totalCbInt) {{ number_format($totalCbInt,2) }} @else - @endif @if($totalCbTotal) {{ number_format($totalCbTotal,2) }} @else - @endif