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 $totalObEdps = 0; $totalObEdpsInt = 0; $totalObEdpsTotal = 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) @php if( $user->obEdps <= 0 && $user->obEdpsInt <= 0 && $user->cpRecovery <= 0 && $user->cpRecoveryInt <= 0 && $user->cpwEdpsOwn <= 0 && $user->cpwEdpsInt <= 0){ continue; } @endphp {{ ++$loop->index }} {{ $user->emp_name_english }} {{ $user->emp_id }} {{ $user->designation }} {{ $user->branchName }} {{ date( 'd-m-Y',strtotime($user->edps_start_month) )}} {{ $user->edps_lifetime }} {{ round($user->edps_amount) }} {{-- under ob --}} @if($user->obEdps) {{ number_format($user->obEdps,2) }} @else - @endif @if($user->obEdpsInt) {{ number_format($user->obEdpsInt,2) }} @else - @endif @if($user->obEdpsTotal) {{ number_format($user->obEdpsTotal,2) }} @else - @endif @php $totalObEdps += $user->obEdps; $totalObEdpsInt += $user->obEdpsInt; $totalObEdpsTotal += $user->obEdpsTotal; @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->cpwEdpsOwn) {{ number_format($user->cpwEdpsOwn,2) }} @else - @endif @if($user->cpwEdpsInt) {{ number_format($user->cpwEdpsInt,2) }} @else - @endif @if($user->cpwEdpsTotal) {{ number_format($user->cpwEdpsTotal,2) }} @else - @endif @php $totalCpwOwn += $user->cpwEdpsOwn; $totalCpwInt += $user->cpwEdpsInt; $totalCpwTotal += $user->cpwEdpsTotal; @endphp {{-- Under closing balance --}} @if($user->closingBalance) {{ number_format($user->closingBalance,2) }} @else - @endif @if($user->closingBalanceInt) {{ number_format($user->closingBalanceInt,2) }} @else - @endif {{ number_format($user->closingBalanceTotal, 2 ) }} @php $totalCb += $user->closingBalance; $totalCbInt += $user->closingBalanceInt; $totalCbTotal += $user->closingBalanceTotal; @endphp @endforeach {{-- Table Footer --}} Total @if($totalObEdps) {{ number_format($totalObEdps,2) }} @else - @endif @if($totalObEdpsInt) {{ number_format($totalObEdpsInt,2) }} @else - @endif @if($totalObEdpsTotal) {{ number_format($totalObEdpsTotal,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