@extends('layouts.main') @section('content')
{{$title}}
@if(Auth::user()->canDo(['post_transactions'])) Add Bank Transaction @endif @if(Auth::user()->canDo(['view_banks'])) Bank @endif @if(Auth::user()->canDo(['create_banks'])) Add Bank @endif @if(Auth::user()->canDo(['view_transactions'])) Generate Report @endif
@foreach($deposits as $deposit) @endforeach
# Date by Bank Reciept Number Type Deposit Withdraw Recorded by Action
{{$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}}
{{method_field('DELETE')}} {{ csrf_field() }} @if(Auth::user()->canDo(['edit_transactions'])) Edit @endif @if(Auth::user()->canDo(['delete_transactions'])) @endif
Total {{number_format($total_deposit)}} {{number_format($total_withdraw)}}

@if(!empty($from)) @endif @foreach($banks as $bank) @if(empty($from)) @else @endif @endforeach
# Bank name Total Deposit Total withdraw
{{$bank->id}} {{$bank->account_number}}{{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'))}} {{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
@endsection