{% extends "base.html" %} {% from "components/ui.html" import page_header %} {% block content %} {% set breadcrumbs = [ {'text': 'Inventory', 'url': url_for('inventory.list_stock_items')}, {'text': 'Stock Items', 'url': url_for('inventory.list_stock_items')}, {'text': item.name, 'url': url_for('inventory.view_stock_item', item_id=item.id)}, {'text': 'Stock Levels'} ] %} {{ page_header( icon_class='fas fa-list-ul', title_text='Stock Levels - ' + item.name, subtitle_text=item.sku, breadcrumbs=breadcrumbs ) }}
{% for stock in stock_levels %} {% else %} {% endfor %}
{{ _('Warehouse') }} {{ _('Quantity On Hand') }} {{ _('Quantity Reserved') }} {{ _('Available') }} {{ _('Location') }} {{ _('Last Counted') }}
{{ stock.warehouse.code }} - {{ stock.warehouse.name }} {{ stock.quantity_on_hand }} {{ stock.quantity_reserved }} {{ stock.quantity_available }} {{ stock.location or '—' }} {% if stock.last_counted_at %} {{ stock.last_counted_at.strftime('%Y-%m-%d') }} {% else %} — {% endif %}
{{ _('No stock found for this item in any warehouse.') }}
{{ _('Total') }}: {{ stock_levels|sum(attribute='quantity_on_hand') }} {{ stock_levels|sum(attribute='quantity_reserved') }} {{ stock_levels|sum(attribute='quantity_available') }}
{% endblock %}