{% extends 'base.html' %} {% load static %} {% load custom_tags %} {% block title %}Dashboard - Business Analytics{% endblock %} {% block content %}

Business Dashboard

Real-time business insights and analytics

Last updated:
Total Sales
KSh {{ total_sales|floatformat:2|default:"0.00" }}
Profit/Loss
KSh {{ profit_loss|floatformat:2|default:"0.00" }}
Inventory Value
KSh {{ inventory_value|floatformat:2|default:"0.00" }}
Sales Performance
Today's Sales
KSh {{ daily_sales|floatformat:2|default:"0.00" }}
This Week
KSh {{ weekly_sales|floatformat:2|default:"0.00" }}
This Month
KSh {{ monthly_sales|floatformat:2|default:"0.00" }}
Payment Methods Breakdown
{% if sales_by_payment_method %} {% for method in sales_by_payment_method %}
{% if method.payment_method == 'cash' %} {% elif method.payment_method == 'mpesa' %} {% elif method.payment_method == 'credit' %} {% elif method.payment_method == 'cheque' %} {% else %} {% endif %}
{{ method.payment_method|title|default:"Unknown" }}
KSh {{ method.total|floatformat:2|default:"0.00" }}
{% endfor %} {% else %}
No sales data available yet. Make your first sale
{% endif %}
Alerts & Quick Actions
{% if low_stock_count > 0 %} {% endif %} {% if near_expiry_count > 0 %} {% endif %} {% if pending_orders > 0 %} {% endif %}
Customer Insights
View All
{{ customer_growth }}
New This Month
{{ top_customers|length }}
Top Customers
Top Customers
{% for customer in top_customers %}
{{ customer.first_name|first }}{{ customer.last_name|first }}
{{ customer.first_name }} {{ customer.last_name }}
KSh {{ customer.total_spent|floatformat:2|default:"0.00" }}
{% empty %}

No customer data available

{% endfor %}
HR Overview
View All
{{ employee_count }}
Active Employees
{{ employee_attendance.count }}
Present Today
{% block extra_js %} {# Add jQuery CDN here if not already included in base.html #} {% endblock %} {% endblock %}