@extends('layouts.main') @section('content')
| # | Date | by | Bank | Reciept Number | Type | Deposit | Withdraw | Recorded by | Action | @foreach($deposits as $deposit)
|---|---|---|---|---|---|---|---|---|---|
| {{$deposit->id}} | {{$deposit->date}} | {{App\User::find($deposit->deposited_by)->name}} | {{$deposit->bank->account_number}} | {{$deposit->voucher_number}} | {{$deposit->transaction_type}} | @if($deposit->transaction_type == "Deposit") {{number_format($deposit->amount)}} @endif | @if($deposit->transaction_type == "Withdraw") {{number_format($deposit->amount)}} @endif | {{$deposit->user->name}} | |
| Total | {{number_format($total_deposit)}} | {{number_format($total_withdraw)}} |
| # | Bank name | Total Deposit | Total withdraw | @if(!empty($from))@endif @foreach($banks as $bank) | ||
|---|---|---|---|---|---|---|
| {{$bank->id}} | {{$bank->account_number}} | @if(empty($from)){{number_format( App\BankDeposit::where('bank_id',$bank->id)->where('transaction_type','Deposit')->sum('amount'))}} | {{number_format( App\BankDeposit::where('bank_id',$bank->id)->where('transaction_type','Withdraw')->sum('amount'))}} | @else{{number_format(App\BankDeposit::where('bank_id',$bank->id)->where('transaction_type','Deposit')->whereBetween('date', [$from,$to])->sum('amount'))}} | {{number_format(App\BankDeposit::where('bank_id',$bank->id)->where('transaction_type','Withdraw')->whereBetween('date', [$from,$to])->sum('amount'))}} | @if(Auth::user()->canDo(['view_transactions'])) Show Details @endif | @endif