SL# Name of Employee Employee Id Designation Joining Date Branch Name Opening Balance Current Period Closing Balance {{-- under ob --}} {{-- Own Org. Total --}} {{-- under Currnt Period Recov --}} Deposit Refund Adjustment {{-- under closing balance --}} {{-- Own Org. Total --}} @php // Declare varriable for total calculation $totalObWf = 0; $totalCurrentPeriodDeposit = 0; $totalCurrentPeriodReturn = 0; $totalClosingBalance = 0; @endphp @foreach ($data['users'] as $user) {{ ++$loop->index }} {{ $user->emp_name_english }} {{ $user->emp_id }} {{ $user->designation }} {{ date( 'd-m-Y', strtotime($user->joining_date) ) }} {{ $user->branchName }} {{-- under ob --}} @if($user->openningBalanceWf) {{ number_format($user->openningBalanceWf,2) }} @else - @endif @php $totalObWf += $user->openningBalanceWf; @endphp {{-- Under Current Period --}} @if($user->currentPeriodDeposit) {{ number_format($user->currentPeriodDeposit,2) }} @else - @endif @if($user->currentPeriodReturn) {{ number_format($user->currentPeriodReturn,2) }} @else - @endif - @php $totalCurrentPeriodDeposit += $user->currentPeriodDeposit; $totalCurrentPeriodReturn += $user->currentPeriodReturn; @endphp {{-- Under Closing Balance --}} @if($user->closingBalance) {{ number_format($user->closingBalance,2) }} @else - @endif @php $totalClosingBalance += $user->closingBalance; @endphp @endforeach Total {{-- Under Ob --}} @if($totalObWf) {{ number_format($totalObWf,2) }} @else - @endif {{-- Under Current Period --}} @if($totalCurrentPeriodDeposit) {{ number_format($totalCurrentPeriodDeposit,2) }} @else - @endif @if($totalCurrentPeriodReturn) {{ number_format($totalCurrentPeriodReturn,2) }} @else - @endif - {{-- Under closing balance --}} @if($totalClosingBalance) {{ number_format($totalClosingBalance,2) }} @else - @endif