@extends('layouts.app') @section('title', 'Account Holders') @section('content')

Account Holders Management

Add New Account Holder
@if(session('success')) @endif @if(session('error')) @endif @if(isset($summary))
Summary
Total Account Holders
{{ $summary['total_holders'] ?? 0 }}
Active: {{ $summary['active_holders'] ?? 0 }} | Inactive: {{ $summary['inactive_holders'] ?? 0 }}
Total Bank Accounts
{{ $summary['total_bank_accounts'] ?? 0 }}
Across all holders
Total Amount
৳{{ number_format($summary['total_amount'] ?? 0, 2) }}
Current balance
Transactions
+৳{{ number_format($summary['total_deposits'] ?? 0, 2) }}
Deposits
-৳{{ number_format($summary['total_withdrawals'] ?? 0, 2) }}
Withdrawals
@endif @if($accountHolders->count() > 0)
@foreach($accountHolders as $holder) @endforeach
ID Name Contact Person Phone Email Status Bank Accounts Total Amount Actions
{{ $holder->id }} {{ $holder->name }} @if($holder->description)
{{ Str::limit($holder->description, 50) }} @endif
{{ $holder->contact_person ?? 'N/A' }} {{ $holder->phone ?? 'N/A' }} {{ $holder->email ?? 'N/A' }} @if($holder->is_active) Active @else Inactive @endif {{ $holder->bankAccounts->count() }} accounts ৳{{ number_format($holder->total_amount ?? 0, 2) }}
@csrf @method('DELETE')
{{ $accountHolders->links() }}
@else

No Account Holders Found

Start by adding your first account holder.

Add Account Holder
@endif
@endsection