{% extends "base.html" %} {% import 'components/macros.html' as ui %} {% block title %}AI Predictions{% endblock %} {% block head_extra %} {% endblock %} {% block content %}
AI Forecast Center

Sales Prediction Dashboard

{{ data.forecast.momentum_text }}

{{ ui.button('Back to Admin', '/admin') }} {{ ui.button('Open Sales', '/sales') }}
Momentum
{{ data.forecast.momentum_label }}

{{ data.totals.days_tracked }} tracked day(s)

Total revenue analyzed: {{ currency_symbol }} {{ "%.2f"|format(data.totals.total_revenue) }}

Total orders analyzed: {{ data.totals.total_orders }}

Predicted Next Day
{{ currency_symbol }} {{ "%.2f"|format(data.forecast.next_day_sales) }}

Estimated orders: {{ data.forecast.next_day_orders }}

Predicted Next 7 Days
{{ currency_symbol }} {{ "%.2f"|format(data.forecast.next_week_sales) }}

Forecast built from recent sales rhythm and trend direction.

Average Basket
{{ currency_symbol }} {{ "%.2f"|format(data.forecast.avg_ticket) }}

Average revenue per completed sale.

Recent Sales History

{% for row in data.history %} {% else %} {% endfor %}
Date Orders Revenue
{{ row["day"] }} {{ row["orders"] }} {{ currency_symbol }} {{ "%.2f"|format(row["revenue"]) }}
No sales history available yet.

Low Stock Risks

{% for item in data.low_stock %} {% else %} {% endfor %}
Product Stock Risk
{{ item["name"] }} {{ item["stock"] }} {{ item["risk"] }}
No low stock products right now.

Inventory Pressure

{% for item in data.inventory_pressure %} {% else %} {% endfor %}
Product Stock Unit Price Stock Value
{{ item["name"] }} {{ item["stock"] }} {{ currency_symbol }} {{ "%.2f"|format(item["price"]) }} {{ currency_symbol }} {{ "%.2f"|format(item["stock_value"]) }}
No inventory data available.
{% endblock %}