@extends('layouts.app') @section('title', 'Savings Accounts') @section('content')

{{ \App\Models\SavingsAccount::count() }}

Total Accounts

USD {{ number_format(\App\Models\SavingsAccount::sum('current_balance'), 2) }}

Total Balance

{{ \App\Models\SavingsAccount::active()->count() }}

Active Accounts

{{ \App\Models\SavingsTransaction::count() }}

Total Transactions

Savings Accounts
@forelse($savingsAccounts as $account) @empty @endforelse
ACCOUNT NO. CLIENT PRODUCT TYPE BALANCE INTEREST RATE STATUS CREATED ACTIONS
{{ $account->account_number }}
@if ($account->client)
{{ $account->client->full_name }}
{{ $account->client->client_number }} @else
Client Missing
@endif
{{ $account->product_name }} {{ ucfirst($account->type) }} USD {{ number_format($account->current_balance, 2) }} {{ $account->interest_rate }}% @if($account->status == 'active') Active @elseif($account->status == 'dormant') Dormant @elseif($account->status == 'closed') Closed @else Frozen @endif {{ $account->created_at->format('M d, Y') }}

No savings accounts found

No savings accounts match your criteria.

@if($savingsAccounts->hasPages())
Showing {{ $savingsAccounts->firstItem() }} to {{ $savingsAccounts->lastItem() }} of {{ $savingsAccounts->total() }} accounts
{{ $savingsAccounts->links() }}
@endif
@endsection