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

{{ title }}

{{ total_count }} loans with outstanding balances

⚠️
Total Outstanding
KES {{ total_outstanding|floatformat:2|intcomma }}
1.
Loans with Outstanding
{{ total_count|intcomma }}
🧮
Average Outstanding
KES {% if total_count > 0 %}{{ total_outstanding|div:total_count|floatformat:2|intcomma }}{% else %}0{% endif %}

Loans with Outstanding Balances

All loans that have remaining balances to be collected

{% if loans %}
{% for loan in loans %} {% endfor %}
Borrower Total Amount Amount Paid Outstanding Balance Due Date Days Overdue Actions
👤
{{ loan.borrower.get_full_name }}
{{ loan.borrower.phone_number }}
KES {{ loan.total_amount|floatformat:2|intcomma }} KES {{ loan.amount_paid|floatformat:2|intcomma }} KES {{ loan.outstanding_amount|floatformat:2|intcomma }} {{ loan.due_date|date:"M d, Y" }} {% now "Y-m-d" as today %} {% if loan.due_date|date:"Y-m-d" < today %} {% with days_overdue=today|timeuntil:loan.due_date %} {{ loan.due_date|timesince|truncatewords:1 }} overdue {% endwith %} {% else %} Current {% endif %}
{% if loans.has_other_pages %}
{% if loans.has_previous %} Previous {% endif %} {% if loans.has_next %} Next {% endif %}
{% endif %} {% else %}

No outstanding balances

All loans are fully paid or have no outstanding balances.

{% endif %}
{% endblock %}