{% extends 'base.html' %} {% load humanize %} {% block title %}{{ title }} - HAVEN GRAZURI ADVANCE{% endblock %} {% block content %}

{{ title }}

{{ total_count }} clients found

Back to All Clients {% load permission_tags %} {% has_permission user 'clients' 'create' as can_create_client %} {% if can_create_client %} + Add Client {% endif %}
Active Clients Inactive Clients With Loans Without Loans Blacklisted
👥
Total Clients
{{ total_count|intcomma }}
🔍
Filter
{{ status_filter|title }}
With Active Loans
{% for client in clients %} {% if client.active_loans > 0 %}{{ forloop.counter0|add:1 }}{% endif %} {% empty %}0{% endfor %}
New This Month
{% now "Y-m-01" as month_start %} {% for client in clients %} {% if client.date_joined >= month_start %}{{ forloop.counter0|add:1 }}{% endif %} {% empty %}0{% endfor %}

Client Details

Detailed information about {{status_filter|default:"all"|cut:"_"|title }} clients

{% if clients %}
{% for client in clients %} {% endfor %}
Client Contact Loans Total Borrowed Status Joined Actions
{% if client.selfie %} {{ client.get_full_name }} {% else %}
{{ client.first_name|first }}{{ client.last_name|first }}
{% endif %}
{{ client.get_full_name }}
ID: {{ client.national_id|default:"N/A" }}
{{ client.phone_number }}
{{ client.email|default:"No email" }}
Total: {{ client.total_loans }}
Active: {{ client.active_loans }}
KES {{ client.total_borrowed|floatformat:2|intcomma }}
Repaid: KES {{ client.total_repaid|floatformat:2|intcomma }}
{% if client.is_active %}Active {% elif client.status == 'blacklisted' %}Blacklisted {% else %}Inactive{% endif %} {{ client.date_joined|date:"M d, Y" }} View Details
{% if clients.has_other_pages %}
{% if clients.has_previous %} Previous {% endif %} {% if clients.has_next %} Next {% endif %}
{% endif %} {% else %}
👥

No {{ status_filter|default:"all"|cut:"_"|title }} clients found

There are currently no clients matching the "{{ status_filter|default:"all"|cut:"_"|title }}" criteria.

{% endif %}
{% endblock %}