{% extends 'base.html' %} {% load humanize %} {% load utils_filters %} {% block title %}Approve Loan Application -RuralPointADVANCE{% endblock %} {% block content %}

Loan Application Review

Application #{{ application.application_number }}

{{ application.get_status_display }} {% if application.auto_approved %} Auto-Approved {% endif %}

Borrower Information

Full Name
{{ application.borrower.get_full_name }}
Phone Number
{{ application.borrower.phone_number }}
Email
{{ application.borrower.email }}
Business Name
{{ application.borrower.business_name|default:"-" }}
Credit Score
{% if application.credit_score %} {{ application.credit_score }} {% else %} Not Available {% endif %}
Previous Loans
{{ application.borrower.loans.count }} {% with defaulted=defaulted_loans %} {% if defaulted > 0 %} ({{ defaulted }} defaulted) {% endif %} {% endwith %}

Loan Details

Loan Product
{{ application.loan_product.name }}
Product Type
{{ application.loan_product.get_product_type_display }}
Requested Amount
KES {{ application.requested_amount|floatformat:2 }}
Duration
{{ application.requested_duration }} days
Interest Amount
KES {{ application.interest_amount|floatformat:2 }}
Processing Fee
KES {{ application.processing_fee_amount|floatformat:2 }}
Total Amount
KES {{ application.total_amount|floatformat:2 }}
Purpose
{{ application.purpose }}

Supporting Documents

{% if application.supporting_documents %}
{% for document in application.supporting_documents.all %}

{{ document.filename }}

{{ document.file.size|filesizeformat }}

View
{% endfor %}
{% else %}

No supporting documents provided

{% endif %}

Risk Assessment

Credit Score Rating
{% if application.credit_score %}
{% if application.credit_score >= 700 %}
Excellent ({{ application.credit_score }}) {% elif application.credit_score >= 600 %}
Fair ({{ application.credit_score }}) {% else %}
Poor ({{ application.credit_score }}) {% endif %}
{% else %} Not Available {% endif %}
Payment History
{% with total_loans=application.borrower.loans.count %} {% with paid_loans=paid_loans %} {% if total_loans > 0 %}
{% if paid_loans == total_loans %}
Perfect Payment History {% elif paid_loans >= total_loans|multiply:0.7 %}
Good Payment History {% else %}
Poor Payment History {% endif %}
{% else %} No Previous Loans {% endif %} {% endwith %} {% endwith %}
Debt-to-Income Ratio
{% if application.borrower.monthly_income %} {% with dti_ratio=application.total_amount|divide:application.borrower.monthly_income|multiply:100 %}
{% if dti_ratio <= 40 %}
Good ({{ dti_ratio|floatformat:1 }}%) {% elif dti_ratio <= 50 %}
Fair ({{ dti_ratio|floatformat:1 }}%) {% else %}
High ({{ dti_ratio|floatformat:1 }}%) {% endif %}
{% endwith %} {% else %} Monthly income not provided {% endif %}
Risk Level
{% with risk_score=application.calculate_risk_score %}
{% if risk_score >= 80 %}
Low Risk {% elif risk_score >= 60 %}
Medium Risk {% else %}
High Risk {% endif %}
{% endwith %}
{% csrf_token %}
Cancel
{% endblock %}