{% extends "inventory/base.html" %}{% load humanize_tags %} {% block title %}{{ item.sku }}{% endblock %} {% block content %}
Items / {{ item.sku }}
NRV {{ item.nrv }} is below cost: lower-of-cost-or-NRV write-down {{ writedown|money2 }}.
{% endif %} {% if suggestion %}Reorder suggested: {{ suggestion.qty|num:0 }} units ({{ suggestion.reason }}), stockout risk {{ suggestion.risk }}.
{% endif %}actual forecast {{ run.interval_level|default:0.9|pct }} prediction interval
{% if result %}Model {{ result.model }} ({{ result.demand_class }}, ADI {{ result.adi|num:2 }}, CV² {{ result.cv2|num:2 }}) - backtest MASE {{ result.mase|num:2 }}, MAPE {{ result.mape|pct }}. Run #{{ run.pk }}
{% else %}No forecast run yet for this item. Run forecasts. Policy numbers use trailing 12-month demand.
{% endif %}| Metric | Formula | Substituted | Result |
|---|---|---|---|
| {{ e.name }} | {{ e.formula }} | {{ e.values }} | {{ e.result }} |
| From qty | Unit cost | Order qty | Annual cost | Feasible |
|---|---|---|---|---|
| {{ t.min_qty|num:0 }} | {{ t.unit_cost|num:2 }} | {{ t.order_qty|num:0 }} | {{ t.total_cost|num:0 }} | {% if t.feasible %}yes{% else %}no{% endif %}{% if t.unit_cost == plan.unit_cost and t.feasible %} (chosen if cheapest){% endif %} |
MOQ {{ item.moq|qty }}, pack size {{ item.pack_size|qty }}, ordering cost {{ inp.order_cost|num:2 }}.
| Received | Left / in | Unit cost | Value | Expiry |
|---|---|---|---|---|
| {{ l.date }} | {{ l.qty_left|qty }} / {{ l.qty_in|qty }} | {{ l.unit_cost|money2 }} | {{ l.value|money2 }} | {{ l.expiry|default_if_none:"" }} |
| No stock. | ||||
| Date | Type | Ref | Warehouse | Qty | Unit cost | Value change | Qty after | Value after | Cost layers consumed | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ r.m.date }} | {{ r.m.kind }} | {{ r.m.reference }} | {{ r.m.warehouse }}{% if r.m.to_warehouse %} → {{ r.m.to_warehouse }}{% endif %} | {{ r.m.qty|qty }} | {% if r.p %}{{ r.p.unit_cost|money2 }} | {{ r.p.value_delta|money2 }} | {{ r.p.qty_after|qty }} | {{ r.p.value_after|money2 }} | {% for d, q, cost in r.consumed %}{{ d }}: {{ q|qty }} @ {{ cost|money2 }}{% if not forloop.last %}; {% endif %}{% endfor %}{% if r.p.unbacked_qty %} {{ r.p.unbacked_qty|qty }} unbacked{% endif %} | {% else %}warehouse transfer, no cost effect | {% endif %}||||