{% extends 'base.html' %} {% load static %} {% block page_title %}Sales Reports{% endblock %} {% block header_actions %}
Back
{% endblock %} {% block content %}
Report Filters
Clear Filters
Total Revenue
KSh {{ total_amount|default:"0.00"|floatformat:2 }}
From {{ sales.count }} sales
Total Quantity
{{ total_quantity|default:"0" }}
Units sold
Average Sale
{% if sales.count > 0 %} KSh {{ average_sale|default:"0.00"|floatformat:2 }} {% else %} KSh 0.00 {% endif %}
Per transaction
Top Product
{% if product_sales.0 %} {{ product_sales.0.product__name|truncatechars:15 }} {% else %} N/A {% endif %}
{% if product_sales.0 %} {{ product_sales.0.total_quantity }} units {% endif %}
Sales Transactions
{{ sales.count }} records
{% for sale in sales %} {% empty %} {% endfor %}
Date & Time Product Quantity Unit Price Total Payment Customer Actions
{{ sale.sale_date|date:"M d, Y" }} {{ sale.sale_date|date:"H:i" }}
{{ sale.product.name }} SKU: {{ sale.product.sku }}
{{ sale.quantity }} KSh {{ sale.unit_price|floatformat:2 }} KSh {{ sale.total_amount|floatformat:2 }} {% if sale.payment_method == 'cash' %} Cash {% elif sale.payment_method == 'mpesa' %} M-Pesa {% elif sale.payment_method == 'card' %} Card {% else %} {{ sale.payment_method }} {% endif %} {% if sale.customer_name %}
{{ sale.customer_name }} {% if sale.customer_phone %} {{ sale.customer_phone }} {% endif %}
{% else %} Walk-in {% endif %}
No sales records found

Try adjusting your filters or make your first sale.

Product Sales
{% for item in product_sales|slice:":5" %} {% endfor %}
Product Quantity Revenue
{{ item.product__name|truncatechars:20 }} {{ item.total_quantity }} KSh {{ item.total_amount|floatformat:2 }}
Payment Methods
{% endblock %}