Name: {{ $account->name }}
Type: {{ $account->type }}
Balance: {{ $account->balance }}
Created: {{ $account->created_at->diffForHumans() }}
Back to Accounting
@if($account->transactions->isEmpty())

There are no transactions for this user.

@else

{{ $account->name }} transactions

@php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($account->transactions as $transaction) @endforeach
Description Date Debit Credit
@if (empty($transaction->description)) {{"N/A"}} @else {{$transaction->description}} @endif {{ $transaction->created_at->format('d M, Y') }} @if ($transaction->type == 'debit') @php $totalDebit += $transaction->amount; @endphp {{ number_format($transaction->amount, 2) }} @else {{ '-' }} @endif @if ($transaction->type == 'credit') @php $totalCredit += $transaction->amount; @endphp {{ number_format($transaction->amount, 2) }} @else {{ '-' }} @endif
Closing Balance {{ number_format($totalCredit - $totalDebit, 2) }}
Total {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}
@endif