@extends('layout.main') @section('content')

Loan Product Details

Comprehensive information about {{ $loanType->product_name }}

Back to List @can('loans-products-edit') Edit Product @endcan

Basic Information

{{ $loanType->product_name }}

{{ $loanType->short_name }}

{{ $loanType->description ?: 'No description provided' }}

@if($loanType->start_date && $loanType->end_date) @php $now = now(); $startDate = \Carbon\Carbon::parse($loanType->start_date); $endDate = \Carbon\Carbon::parse($loanType->end_date); @endphp @if($now->between($startDate, $endDate)) Active @elseif($now->lt($startDate)) Pending @else Expired @endif @else Not Set @endif

@if($loanType->partially_approve) Yes @else No @endif

Financial Configuration

{{ $loanType->fund->name ?? 'N/A' }}

{{ $loanType->currency->name ?? 'N/A' }}

{{ \App\Constants\LoanConstants::getInterestTypeName($loanType->interest_method) ?? 'N/A' }}

{{ $loanType->days_in_year ?? 'N/A' }}

Date Configuration

{{ $loanType->start_date ? \Carbon\Carbon::parse($loanType->start_date)->format('M d, Y') : 'Not set' }}

{{ $loanType->end_date ? \Carbon\Carbon::parse($loanType->end_date)->format('M d, Y') : 'Not set' }}

{{ $loanType->days_in_month ?? 'N/A' }}

Risk Management

{{ $loanType->number_days_overdue ?? 'N/A' }} days

{{ $loanType->max_day_before_bad_loan ?? 'N/A' }} days

Associated Charges

@if($loanType->charges && $loanType->charges->count() > 0)
@foreach($loanType->charges as $charge)
{{ $charge->name }}
@if($charge->format === 'rate') {{ formatAmount($charge->amount) }}% @else {{ formatCurrencyDecimals($charge->amount) }} @endif
@if($charge->description)

{{ Str::limit($charge->description, 80) }}

@endif
Type: {{ $charge->charge_type->name ?? 'N/A' }}
@endforeach
@else

No Charges Associated

This loan product has no associated charges.

@endif

System Information

{{ $loanType->created_by()->first()->name ?? 'System' }}

{{ $loanType->created_at ? $loanType->created_at->format('M d, Y g:i A') : 'N/A' }}

{{ $loanType->updated_by()->first()->name ?? 'N/A' }}

{{ $loanType->updated_at ? $loanType->updated_at->format('M d, Y g:i A') : 'N/A' }}

@if(Auth::user()->can('loans-products-edit') || Auth::user()->can('loans-products-delete') || Auth::user()->can('loans-products-penalty-create'))

Quick Actions

@can('loans-products-edit') Edit Product @endcan @can('loans-products-penalty-create') Manage Penalties @endcan @can('loans-products-delete')
@csrf @method('DELETE')
@endcan
@endif
@endsection