{% extends 'base.html' %} {% load static %} {% block page_title %}Analytics Dashboard{% endblock %} {% block header_actions %}
{% endblock %} {% block content %}No sales data available
| Cash | {{ payment_stats.cash|default:"0" }}% |
| M-Pesa | {{ payment_stats.mpesa|default:"0" }}% |
| Card | {{ payment_stats.card|default:"0" }}% |
| Credit | {{ payment_stats.credit|default:"0" }}% |
| Borrower | Amount | Due Date | Days Overdue |
|---|---|---|---|
| {{ loan.borrower_name|truncatechars:15 }} | KSh {{ loan.total_due|floatformat:2 }} | {{ loan.due_date|date:"M d, Y" }} | {% if loan.days_remaining < 0 %} {{ loan.days_remaining|stringformat:"d"|slice:"1:" }} days {% else %} 0 days {% endif %} |
No overdue loans
| Product | Current Stock | Min Level | Status |
|---|---|---|---|
| {{ product.name|truncatechars:20 }} | {{ product.quantity_in_stock }} | {{ product.minimum_stock_level }} | {% if product.quantity_in_stock == 0 %} Out of Stock {% else %} Low Stock {% endif %} |
All products are well stocked
{% if daily_sales|length > 0 %} Average daily sales: KSh {{ average_daily_sales|default:"0"|floatformat:2 }} {% else %} Start recording sales to generate insights. {% endif %}
{{ low_stock_products.count|default:"0" }} products need restocking. Total inventory value: KSh {{ stock_value|default:"0"|floatformat:2 }}
{{ overdue_loans.count|default:"0" }} overdue loans require attention. Total active loans: KSh {{ total_active_loans|default:"0"|floatformat:2 }}