{% extends 'base.html' %} {% load humanize %} {% load utils_filters %} {% block title %}Client Report - {{ client.get_full_name }} - HAVEN GRAZURI ADVANCE{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
📈

Client Report

Generated on {{ report_date|date:"F d, Y" }} at {{ report_date|time:"g:i A" }}

👤

Client Information

🪪Personal Details

Full Name
{{ client.get_full_name }}
ID Number
{{ client.id_number }}
Phone
📞{{ client.phone_number }}
Email
✉️{{ client.email }}

🏢Business Information

Business Name
{{ client.business_name }}
Business Type
{{ client.business_type|title }}
Monthly Income
KES {{ client.monthly_income|floatformat:2|intcomma }}

Account Status

Status
{{ client.get_status_display }}
Member Since
{{ client.date_joined|date:"F d, Y" }}

Credit Score

{{ credit_score }}
/ 100

{% if credit_score >= 80 %}Excellent{% elif credit_score >= 60 %}Good{% else %}Needs Improvement{% endif %}

🪙

Loan Summary

1. Total
{{ loan_stats.total_loans }}
Total Loans
Active
{{ loan_stats.active_loans }}
Active Loans
Borrowed
KES {{ loan_stats.total_borrowed|floatformat:0|intcomma }}
Total Borrowed
Repaid
KES {{ loan_stats.total_repaid|floatformat:0|intcomma }}
Total Repaid

📊 Repayment Performance

On Time {{ loan_stats.on_time_rate|floatformat:1 }}%
Late {{ loan_stats.late_rate|floatformat:1 }}%
⚠️Defaulted {{ loan_stats.default_rate|floatformat:1 }}%

Credit Score Components

{% for component, score in credit_score_details.items %}
{{ component|title|replace:"_":" " }} {{ score|floatformat:1 }}/100
{% endfor %}

Loan History

{% if loans %} {{ loans|length }} record{{ loans|length|pluralize }} {% endif %}
{% if loans %}
{% for loan in loans %} {% endfor %}
Loan ID Amount Status Disbursed Due Date Amount Paid Progress
{{ loan.loan_number }} KES {{ loan.principal_amount|floatformat:2|intcomma }} {{ loan.get_status_display }} {{ loan.disbursement_date|date:"M d, Y" }} {{ loan.due_date|date:"M d, Y" }} KES {{ loan.amount_paid|floatformat:2|intcomma }} {% with progress=loan.amount_paid|div:loan.principal_amount|mul:100 %}
{% if progress > 100 %}100{% else %}{{ progress|floatformat:0 }}{% endif %}%
{% endwith %}
{% else %}
📥

No Loan History

This client has no loan history available at the moment.

{% endif %}
📂

Document Status

{% with uploaded_docs=documents.values|count_true %} {{ uploaded_docs }} of {{ documents|length }} uploaded {% endwith %}
{% for doc_type, is_uploaded in documents.items %}
{% if is_uploaded %} {% else %} ⚠️ {% endif %}

{{ doc_type|title|replace:"_":" " }}

{{ is_uploaded|yesno:"Uploaded,Missing" }}

{% if not is_uploaded %}
{% endif %}
{% endfor %}
📊 Document Completion
{% with uploaded_docs=documents.values|count_true total_docs=documents|length completion_rate=uploaded_docs|div:total_docs|mul:100 %}
{{ completion_rate|floatformat:0 }}%
{% endwith %}

Risk Assessment

{% if credit_score >= 80 %}Low Risk{% elif credit_score >= 60 %}Medium Risk{% else %}High Risk{% endif %}

Based on credit score and payment history

Recommendations

{% if credit_score >= 80 %}
👍

Excellent Client

Consider offering premium loan products with better terms.

{% elif credit_score >= 60 %}
⚠️

Good Client

Standard loan terms apply. Monitor payment behavior closely.

{% else %}
⚠️

High Risk Client

Require additional collateral or guarantors for future loans.

{% endif %} {% if loan_stats.default_rate > 20 %}

High Default Rate

Consider financial counseling or restructured payment plans.

{% endif %}
Logo

HAVEN GRAZURI ADVANCE

This comprehensive client report was automatically generated on {{ report_date|date:"F d, Y" }} at {{ report_date|time:"g:i A" }}. All data is current as of the generation date and reflects the most recent client information available in our systems.

Report ID: {{ client.id }} Generated by: System Version: 2.0 📞Support: +254-XXX-XXXX
{% endblock %}