{% extends 'inventory/base_inventory_minimal.html' %}
{% block inventory_title %}Журнал операций{% endblock %}
{% block breadcrumb_current %}Журнал{% endblock %}
{% block inventory_content %}<div class="card"><div class="card-header"><h4 class="mb-0">Журнал всех складских операций</h4></div><div class="card-body">{% if movements %}<table class="table table-hover table-sm"><thead><tr><th>Товар</th><th>Изменение</th><th>Причина</th><th>Дата</th></tr></thead><tbody>{% for m in movements %}<tr><td>{{ m.product.name }}</td><td>{% if m.change > 0 %}<span class="badge bg-success">+{{ m.change }}</span>{% else %}<span class="badge bg-danger">{{ m.change }}</span>{% endif %}</td><td>{{ m.get_reason_display }}</td><td>{{ m.created_at|date:"d.m.Y H:i" }}</td></tr>{% endfor %}</tbody></table>{% else %}<div class="alert alert-info">Операций не найдено.</div>{% endif %}</div></div>
{% endblock %}
