{% extends "admin/base.html" %} {% block page_title %}{{ ingredient.name }}{% endblock %} {% block content %} ← До складу

{{ ingredient.name }}

Залишок зараз
{% if ingredient.stock_status == 'critical' %}
🚫
{% elif ingredient.stock_status == 'low' %}
⚠️
{% else %}
{% endif %}
{{ ingredient.current_stock|fmt_qty }} {{ ingredient.unit }}
{% if ingredient.stock_status == 'critical' %}🚫 Немає в наявності {% elif ingredient.stock_status == 'low' %}⚠️ Закінчується — мінімум {{ ingredient.reorder_threshold|fmt_qty }} {{ ingredient.unit }} {% else %}✅ В нормі{% endif %}
{% if ingredient.cost_per_unit %}
Вартість залишку
💰
{{ ingredient.stock_value|fmt_qty }} грн
{{ ingredient.cost_per_unit|fmt_qty }} грн за {{ ingredient.unit }}
{% endif %} {% if ingredient.supplier %}
Постачальник
🚚
{% if last_delivery %}
Востаннє: {{ last_delivery.price_per_unit|fmt_qty if last_delivery.price_per_unit else '—' }} грн/{{ last_delivery.unit or ingredient.unit }} {% if last_delivery.delivery_date %}({{ last_delivery.delivery_date.strftime('%d.%m.%Y') }}){% endif %}
{% endif %}
{% endif %}

➕➖ Прихід / списання

Отримали поставку від постачальника, коригуєте залишок вручну, чи щось списуєте — оберіть тип операції.

⚙️ Налаштування

{% if suppliers %} {% endif %}
{% if used_by %}

🍽 Використовується у стравах

{% for p in used_by %} {{ p.name }} {% endfor %}
{% endif %}

📜 Історія рухів

📥 Скачати історію

{% for m in movements %} {% else %} {% endfor %}
ДатаЗмінаПричинаПриміткаХто
{{ m.created_at.strftime('%d.%m.%Y %H:%M') if m.created_at else '' }} {{ '+' if m.change > 0 }}{{ m.change|fmt_qty }} {{ ingredient.unit }} {{ m.reason_label() }}{% if m.order %} {{ m.order.display_number() }}{% endif %} {{ m.note or '—' }} {{ m.admin_username or '—' }}
Рухів ще не було
{% endblock %}