{% extends 'base.html' %} {% block title %}Fix Loan Totals - Haven Grazuri Investment Limited{% endblock %} {% block content %}

Fix Loan Total Amounts

This tool will fix loans where the total amount is incorrectly calculated.

Summary

Total Loans
{{ total_loans }}
Loans with Incorrect Totals
{{ incorrect_count }}
Loans Already Correct
{{ total_loans|add:"-"|add:incorrect_count }}
{% if incorrect_loans %}

Loans to be Fixed

{% for loan in incorrect_loans %} {% endfor %}
Loan Number Borrower Principal Interest Processing Fee Current Total Correct Total Difference
{{ loan.loan_number }} {{ loan.borrower }} KES {{ loan.principal|floatformat:2 }} KES {{ loan.interest|floatformat:2 }} KES {{ loan.processing_fee|floatformat:2 }} KES {{ loan.current_total|floatformat:2 }} KES {{ loan.correct_total|floatformat:2 }} +KES {{ loan.difference|floatformat:2 }}
{% csrf_token %}

Warning

This action will update {{ incorrect_count }} loan(s) in the database. The total amount will be recalculated as:

Total = Principal + Interest + Processing Fee

Cancel
{% else %}

All loans are correct!

No loans need to be fixed. All total amounts are correctly calculated.

{% endif %}
{% endblock %}