{% extends "base.html" %} {% block title %}本店库存 - {{ current_user.store_name }}{% endblock %} {% block content %}
| # | 水果品类 | 累计领用 | 累计销售 | 当前库存 | 库存状态 |
|---|---|---|---|---|---|
| {{ loop.index }} | {{ item.fruit_name }} | {{ item.total_received }} | {{ item.total_sold }} | {{ item.current_stock }} | {% if item.current_stock == 0 %} 售罄 {% elif item.current_stock <= 5 %} 库存紧张 {% elif item.current_stock <= 20 %} 正常 {% else %} 充足 {% endif %} |
| 合计 | {{ inventory|sum(attribute='total_received') }} | {{ inventory|sum(attribute='total_sold') }} | {{ inventory|sum(attribute='current_stock') }} | ||