{% extends 'core/base.html' %} {% load static %} {% load plan_tags %} {% load currency_tags %} {% block title %}Dashboard — SwiftPOS{% endblock %} {% block topbar_title %}Overview{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% if days_until_expiry is not None and days_until_expiry <= 14 %}
{% if license_expired %}License Expired!{% else %}Subscription expiring in {{ days_until_expiry }} day{{ days_until_expiry|pluralize }}{% endif %} {% if not license_expired %} — Renew now to avoid interruptions.{% endif %}
{% if whatsapp_number %} Renew {% endif %}
{% endif %}
Welcome back 👋
{{ user_name|default:user.get_full_name|default:user.username|upper }}
{{ user_role|default:user.get_role_display|default:"Staff" }}  ·  {% now "l, N j Y" %}
{% if allow_multi_branch %}
{% endif %}
Today's Sales
{{ today_sales|format_currency }}
{{ today_transactions|default:0 }} orders
{% if sales_growth_percentage is not None %}
{{ sales_growth_percentage|floatformat:1 }}%
{% endif %}
Avg. Order
{{ avg_order_value|format_currency }}
{{ today_customers|default:0 }} customers
Products
{{ total_inventory }}
{{ low_stock_products }} low  ·  {{ out_of_stock_products|default:0 }} out
Staff
{{ total_users }}
{{ active_users }} active
Sales Trend — Last 7 Days
Revenue Orders
Payment Methods — Today
{% if payment_breakdown %}
{% for method in payment_breakdown %}
{{ method.label }}
{{ method.total|format_currency }}
{{ method.percentage|floatformat:0 }}%
{% endfor %}
{% else %}
No payment data for today yet
{% endif %}
Sales Snapshot
Today
{{ today_sales|format_currency }}
{{ today_transactions }} orders
Yesterday
{{ yesterday_sales|format_currency }}
{{ yesterday_transactions }} orders
This Week
{{ weekly_sales|format_currency }}
{{ weekly_transactions }} orders
This Month
{{ monthly_sales|format_currency }}
{{ monthly_transactions }} orders
{% if sales_growth_percentage is not None %}
{{ sales_growth_percentage|floatformat:1 }}% vs yesterday
{% endif %}
Top Products Today See all →
{% if top_selling_items %} {% for item in top_selling_items %} {% with forloop.counter as rank %}
{{ rank }}
{{ item.product__name }}
{{ item.total_revenue|format_currency }}
{{ item.total_quantity }} sold
{% endwith %} {% endfor %} {% else %}
No sales recorded today
{% endif %}
Recent Activity View all →
{% if recent_orders %} {% for order in recent_orders %}
{% if order.customer %}{{ order.customer.name }}{% else %}Walk-in Sale{% endif %}
#{{ order.order_number }} · {{ order.created_at|date:"H:i" }}
{{ order.final_amount|format_currency }}
{{ order.payment_status|title }}
{% endfor %} {% else %}
No activity yet today
{% endif %}
Inventory Status
{{ total_inventory }}
Total
{{ in_stock_products }}
In Stock
{{ low_stock_products }}
Low
{{ out_of_stock_products|default:0 }}
Out
Cashier Performance — Today
{% if cashier_performance %}
{% for c in cashier_performance %} {% endfor %}
Cashier Orders Revenue Avg.
{{ c.cashier|slice:':2'|upper }} {{ c.cashier }} {{ c.total_orders }} {{ c.total_sales|format_currency }} {% if c.total_orders %}{{ c.avg_revenue|default:0|format_currency }}{% else %}—{% endif %}
{% else %}
No cashier data for today
{% endif %}
{% plan_usage as usage %} {% if usage.plan_name %}
Subscription
{{ usage.plan_name }}
{% if usage.license_expires_at %}
Expires {{ usage.license_expires_at|date:"M j, Y" }}
{% endif %}
{% if usage.license_active %}Active{% else %}Inactive{% endif %}
Products
{{ usage.products_count }}{% if usage.max_products %} / {{ usage.max_products }}{% endif %}
{% if usage.products_percent is not None %}
{% endif %}
Categories
{{ usage.categories_count }}{% if usage.max_categories %} / {{ usage.max_categories }}{% endif %}
{% if usage.categories_percent is not None %}
{% endif %}
Orders Today
{{ usage.today_orders_count }}{% if usage.max_orders_per_day %} / {{ usage.max_orders_per_day }}{% endif %}
{% if usage.orders_percent is not None %}
{% endif %}
Users
{{ usage.users_count }}{% if usage.max_users %} / {{ usage.max_users }}{% endif %}
{% if usage.users_percent is not None %}
{% endif %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}