{% extends 'base.html' %} {% block page_title %}Dashboard Overview{% endblock %} {% block content %}
Today's Sales
KSh {{ today_sales_amount|default:"0.00"|floatformat:2 }}
{{ today_sales_quantity|default:"0" }} units sold
Total Products
{{ total_products|default:"0" }}
{{ low_stock_products|default:"0" }} low stock
Active Loans
KSh {{ total_active_loan_amount|default:"0.00"|floatformat:2 }}
{{ overdue_loans_count|default:"0" }} overdue
Stock Alerts
{{ stock_alerts|length|default:"0" }}
Require attention
Quick Actions
Add New Product View Sales Report
Stock Alerts
{% if stock_alerts %}
{% for alert in stock_alerts %}
{{ alert.product.name }}
{{ alert.message }}
Alert
{% endfor %}
{% else %}

No stock alerts

{% endif %}
Sales Trend - Last 7 Days
Recent Sales
View All
{% for sale in recent_sales|slice:":5" %} {% empty %} {% endfor %}
Product Qty Amount Time
{{ sale.product.name|truncatechars:20 }} {{ sale.quantity }} KSh {{ sale.total_amount|floatformat:2 }} {{ sale.sale_date|date:"H:i" }}
No recent sales
Active Loans
View All
{% for loan in active_loans|slice:":5" %} {% empty %} {% endfor %}
Borrower Amount Due Date Status
{{ loan.borrower_name|truncatechars:15 }} KSh {{ loan.amount|floatformat:2 }} {{ loan.due_date|date:"M d" }} {% if loan.is_overdue %} Overdue {% else %} Active {% endif %}
No active loans
{% endblock %}