{% load humanize %} {% load dashboard_extras %}
{% for row in weekly_profits %} {% with op_exp=weekly_expenses_map|get_item:row.week|default:0 %} {% endwith %} {% empty %} {% endfor %}
Week Cash Mpesa Total Sales Gross Profit Op. Expenses Net Profit
{{ row.week|date:"Y-m-d" }} Ksh {{ row.cash_sales|default:0|intcomma }} Ksh {{ row.mpesa_sales|default:0|intcomma }} Ksh {{ row.weekly_sales|intcomma }} Ksh {{ row.weekly_profit|intcomma }} {% if op_exp > 0 %} − Ksh {{ op_exp|intcomma }} {% else %} — {% endif %} Ksh {{ row.weekly_profit|subtract:op_exp|intcomma }}
No data