{% extends "core/base.html" %} {% load static %} {% block title %}Stock Forecast - SwiftPOS{% endblock %} {% block topbar_title %}Stock Forecast{% endblock %} {% block content %}

Smart Stock Forecast

Predicted stock exhaustion based on the last 30 days of sales velocity.

{{ counts.critical|default:0 }}
Critical
{{ counts.low_risk|default:0 }}
Low Risk
{{ counts.dead|default:0 }}
Dead Stock
{{ counts.healthy|default:0 }}
Healthy
All {% for val, label in health_choices %} {{ label }} {% endfor %}
{% if forecasts %}
{% for fc in forecasts %} {% endfor %}
Product Current Stock Avg Daily Sales Days Until Stockout Restock Qty Health
{{ fc.product.name }}
{{ fc.product.sku }}
{{ fc.product.stock_quantity }} {{ fc.avg_daily_sales|floatformat:1 }} {% if fc.days_until_stockout is not None %} {{ fc.days_until_stockout }} day{{ fc.days_until_stockout|pluralize }} {% else %} No recent sales {% endif %} {% if fc.recommended_restock_qty > 0 %} {{ fc.recommended_restock_qty }} units {% else %} {% endif %} {% if fc.stock_health == 'critical' %} 🔴 Critical {% elif fc.stock_health == 'low_risk' %} 🟡 Low Risk {% elif fc.stock_health == 'dead' %} 💀 Dead Stock {% elif fc.stock_health == 'overstock' %} 📦 Overstock {% else %} ✅ Healthy {% endif %}
{% else %}

No forecast data yet. Run python manage.py generate_insights to generate forecasts.

{% endif %}
{% endblock %}