| SL | Bank Name | Acount Type | Account Number | Deposit | Withdraw | Cost | Interest | Balance |
| {{$data['i']++}} | {{ $d->bank_name}} | @if($d->type == 1) Bank @endif @if($d->type == 2) Bkash @endif | {{ $d->account_number}} | @php $total_deposit = 0; foreach($d->transaction as $v) { if($v->transaction_type == 1) { $total_deposit = $total_deposit + $v->amount; } } @endphp @if($total_deposit > 0) {{ $total_deposit }} @else - @endif | @php $total_withdraw = 0; foreach($d->transaction as $v) { if($v->transaction_type == 2) { $total_withdraw = $total_withdraw + $v->amount; } } @endphp @if($total_withdraw) {{ $total_withdraw }} @else - @endif | @php $total_cost = 0; foreach($d->transaction as $v) { if($v->transaction_type == 3) { $total_cost = $total_cost + $v->amount; } } @endphp @if ($total_cost) {{ $total_cost }} @else - @endif | @php $total_interest = 0; foreach($d->transaction as $v) { if($v->transaction_type == 4) { $total_interest = $total_interest + $v->amount; } } @endphp @if ($total_interest) {{ $total_interest }} @else - @endif | @php $total = ($total_deposit + $total_interest) - ($total_withdraw + $total_cost); $bankBalance = $bankBalance + $total; @endphp {{ $total }} |
| Total Bank Balance | {{$bankBalance}} | |||||||
|---|---|---|---|---|---|---|---|---|