{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{% if category == 'success' %}✅{% elif category == 'danger' %}❌{% else %}⚠️{% endif %}
{% endfor %}
{% endif %}
{% endwith %}
{{ message }}
| Product Name | SKU | Stock | Weight/Pkg | Status | Actions |
|---|---|---|---|---|---|
| {{ product.name }} | {{ product.sku or '-' }} | {{ product.current_stock_qty if product.is_unit_based else "%.2f"|format(product.current_stock_g) }}{% if not product.is_unit_based %}g{% else %} units{% endif %} | {% if not product.is_unit_based %} {{ "%.2f"|format(product.weight_per_packet_g) }}g {% else %} - {% endif %} | {% if product.get_status() == 'OK' %} OK {% elif product.get_status() == 'LOW' %} LOW {% else %} OUT {% endif %} |
No products in inventory.
{% for product in products %}
{% if not product.is_unit_based %}
{% endif %}
{% endfor %}
{% if not products %}
{{ product.name }}
{{ product.sku or 'No SKU' }}
{% if product.get_status() == 'OK' %}
OK
{% elif product.get_status() == 'LOW' %}
Low
{% else %}
Out
{% endif %}
Stock
{{ product.current_stock_qty if product.is_unit_based else "%.2f"|format(product.current_stock_g) }}{% if not product.is_unit_based %}g{% else %} units{% endif %}
Weight/Pkg
{{ "%.2f"|format(product.weight_per_packet_g) }}g
No products found.
{% endif %}