@extends('layout.main') @section('content')
@if ($client->avatar) Client Avatar @else
No Image
@endif

{{ $client->fullname }}

Client Code: {{ $client->client_code }}

ID Number: {{ $client->idnumber }}

Personal Information

  • Gender: {{ $client->gender ?? 'N/A' }}
  • Phone: {{ $client->phone ?? 'N/A' }}
  • Location: {{ $client->location ?? 'N/A' }}
  • Date of Birth: {{ $client?->dob?->format('d, F Y') ?? 'N/A' }}
  • Sector: {{ $client->sector?->name ?? 'N/A' }}
  • Job Description: {{ $client->job_description ?? 'N/A' }}
  • Registration Fee: {{ $client->charge?->name ?? 'N/A' }}

Referee Information

  • Name: {{ $client->referee_name ?? 'N/A' }}
  • ID Number: {{ $client->referee_id ?? 'N/A' }}
  • Occupation: {{ $client->referee_job ?? 'N/A' }}
  • Contact: {{ $client->referee_phone ?? 'N/A' }}
  • Address: {{ $client->referee_address ?? 'N/A' }}
  • @if ($client->referee_pic)
  • Picture: Referee Picture
  • @endif

Active Loans

@if ($client->clientLoans->whereIn('loan.payment_status', ['unpaid', 'partial'])?->isEmpty())

No active loans found.

@else @if (Auth::user()->can('loans-edit') || Auth::user()->can('loans-delete')) @endif @foreach ($client->clientLoans->whereIn('loan.payment_status', ['unpaid', 'partial']) as $clientLoan) @if ($clientLoan->loan) @if (Auth::user()->can('loans-edit') || Auth::user()->can('loans-show') || Auth::user()->can('loans-delete')) @endif @endif @endforeach
Loan Code Loan Amount Loan + Interest Loan Type Installments StatusActions
{{ $clientLoan->loan->loan_code }} {{ number_format($clientLoan->loan->principal_amount, 2) }} {{ number_format($clientLoan->loan->loan_amount, 2) }} {{ $clientLoan->loan->loanType?->product_name ?? 'N/A' }} {{ number_format($clientLoan->loan->installments) }} @switch($clientLoan->loan->level_status_id) @case(\App\Constants\LoanConstants::APPROVED) Approved @break @case(\App\Constants\LoanConstants::PARTIALLY_APPROVED) partial @break @case(\App\Constants\LoanConstants::DECLINED) rejected @break @default Pending @endswitch
@if (Auth::user()->can('loans-edit')) @endif @can('loans-show') @endcan @if (Auth::user()->can('loans-delete'))
@csrf @method('DELETE')
@endif
@endif

Loan History

@if ($client?->clientLoans?->isEmpty())

No loan history found.

@else @if (Auth::user()->can('loans-edit') || Auth::user()->can('loans-delete')) @endif @foreach ($client->clientLoans as $clientLoan) @if ($clientLoan->loan) @if (Auth::user()->can('loans-edit') || Auth::user()->can('loans-show') || Auth::user()->can('loans-delete')) @endif @endif @endforeach
Loan Code Principal Amount Interest Rate (%) Interest Amount Loan + Interest Loan Type Installments StatusActions
{{ $clientLoan->loan->loan_code }} {{ number_format($clientLoan->loan->principal_amount, 2) }} {{ number_format($clientLoan->loan->interest_rate, 2) }} {{ number_format($clientLoan->loan->interest_amount, 2) }} {{ number_format($clientLoan->loan->loan_amount, 2) }} {{ $clientLoan->loan->loanType?->product_name ?? 'N/A' }} {{ number_format($clientLoan->loan->installments) }} @switch($clientLoan->loan->level_status_id) @case(\App\Constants\LoanConstants::APPROVED) Approved @break @case(\App\Constants\LoanConstants::PARTIALLY_APPROVED) partial @break @case(\App\Constants\LoanConstants::DECLINED) rejected @break @default Pending @endswitch
@if (Auth::user()->can('loans-edit')) @endif @can('loans-show') @endcan @if (Auth::user()->can('loans-delete'))
@csrf @method('DELETE')
@endif
@endif
@endsection @push('scripts') @endpush