{% extends 'base.html' %} {% block title %}Reports — Shiba Meals{% endblock %} {% block page_title %}Reports{% endblock %} {% block content %}
Daily Sales Report
{{ today }} · All outlets · Sorted by revenue
{% set total_revenue = sales_data | sum(attribute='revenue') %} {% set total_sold = sales_data | sum(attribute='sold') %} {% set total_wastage = sales_data | sum(attribute='wastage') %} {% set wastage_alerts_count = sales_data | selectattr('wastage_alert') | list | length %}
Total Revenue
KES {{ "{:,.0f}".format(total_revenue) }}
All products today
Units Sold
{{ total_sold }}
Across all outlets
Wastage Alerts
{{ wastage_alerts_count }}
Products over threshold
Total Wastage
{{ total_wastage }}
Units discarded today
Product Performance CPU = recipe ingredient cost per unit
{% for s in sales_data %} {% else %} {% endfor %}
# Product Category Price CPU Margin Margin % Sold Revenue Wastage Wastage %
{{ loop.index }} {{ s.product.name }} {{ s.product.category }} KES {{ "{:,.0f}".format(s.product.price) }} KES {{ "{:.2f}".format(s.cpu) }} KES {{ "{:.2f}".format(s.margin) }} {{ s.margin_pct }}% {{ s.sold }} KES {{ "{:,.0f}".format(s.revenue) }} {{ s.wastage }} {% if s.wastage_alert %} ⚠ {{ s.wastage_pct }}% {% elif s.wastage > 0 %} {{ s.wastage_pct }}% {% else %} {% endif %}
No sales data for today yet.
{% if sales_data | selectattr('wastage_alert') | list %}
⚠ Wastage Action Required
{% for s in sales_data if s.wastage_alert %}
{{ s.product.name }} — {{ s.wastage_pct }}% wasted today (threshold: {{ s.product.wastage_threshold_pct or 10 }}%). Consider reducing tomorrow's dispatch quantity or investigating storage/preparation. Revenue lost to wastage: KES {{ "{:,.0f}".format(s.wastage * s.product.price) }}
{% endfor %}
{% endif %} {% endblock %}