{% 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} ] %} {{ page_header( icon_class='fas fa-cube', title_text=item.name, subtitle_text=item.sku, breadcrumbs=breadcrumbs, actions_html=('Edit' if (current_user.is_admin or has_permission('manage_stock_items')) else '') + ('History' if (current_user.is_admin or has_permission('view_stock_history')) else '') + ('Stock Levels' if (current_user.is_admin or has_permission('view_stock_levels')) else '') ) }}
{{ item.sku }}
{{ item.category or '—' }}
{{ item.unit }}
{{ item.barcode or '—' }}
{{ item.description }}
{{ "%.2f"|format(item.default_cost) if item.default_cost else '—' }} {{ item.currency_code }}
{{ "%.2f"|format(item.default_price) if item.default_price else '—' }} {{ item.currency_code }}
{{ item.reorder_point }}
{{ item.reorder_quantity or '—' }}
{% if item.is_active %} {{ _('Active') }} {% else %} {{ _('Inactive') }} {% endif %}
{% if item.is_trackable %} {{ _('Yes') }} {% else %} {{ _('No') }} {% endif %}
| {{ _('Warehouse') }} | {{ _('On Hand') }} | {{ _('Reserved') }} | {{ _('Available') }} | {{ _('Location') }} |
|---|---|---|---|---|
| {{ stock.warehouse.code }} - {{ stock.warehouse.name }} | {{ stock.quantity_on_hand }} | {{ stock.quantity_reserved }} | {{ stock.quantity_available }} {% if item.reorder_point and stock.quantity_on_hand < item.reorder_point %} {% endif %} | {{ stock.location or '—' }} |
| {{ _('Date') }} | {{ _('Type') }} | {{ _('Warehouse') }} | {{ _('Quantity') }} | {{ _('Reason') }} |
|---|---|---|---|---|
| {{ movement.moved_at.strftime('%Y-%m-%d %H:%M') if movement.moved_at else '—' }} | {{ movement.movement_type }} | {{ movement.warehouse.code }} | {{ '+' if movement.quantity > 0 else '' }}{{ movement.quantity }} | {{ movement.reason or '—' }} |
{{ item.total_quantity_on_hand or 0 }}
{{ item.total_quantity_reserved or 0 }}
{{ item.total_quantity_available or 0 }}
{{ _('Low Stock Alert') }}
{{ _('This item is not trackable.') }}
{% endif %}{{ reservation.quantity }} {{ item.unit }}
{{ reservation.reservation_type }} #{{ reservation.reservation_id }}
{{ reservation.warehouse.code }}