{% extends "base.html" %}{% block title %}Sales Insights{% endblock %}{% block content %}
🧠Sales Insights
Best Selling Items
| Item | Sold Qty | Revenue | Cost | Gross Profit |
{% for i in top_items %}| {{i.item_name}} | {{i.sold_qty}} | {{'%.2f'|format(i.revenue or 0)}} | {{'%.2f'|format(i.cost_total or 0)}} | {{'%.2f'|format(i.gross_profit or 0)}} |
{% endfor %}
Low Margin Orders (< 10%)
| Order | Item | Sale | Cost | Profit | Suggestion |
{% for l in low_margin %}| {{l.id}} | {{l.item_name}} | {{l.total_price}} | {{l.cost}} | {{l.profit}} | Check cost or increase selling price. |
{% else %}| No low margin orders found. |
{% endfor %}
{% endblock %}