37 lines
2.2 KiB
HTML
37 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Приходные накладные — Стройка{% endblock %}
|
||
{% block page_title %}Приходные накладные{% endblock %}
|
||
{% block topbar_actions %}<a href="{{ url_for('income_add') }}" class="btn btn-primary">+ Новая приходная</a>{% endblock %}
|
||
{% block content %}
|
||
<div class="sort-bar">
|
||
Сортировка:
|
||
<a href="?sort=date_desc" class="btn btn-sm {% if sort=='date_desc' %}btn-primary{% else %}btn-secondary{% endif %}">📅 Дата ↓</a>
|
||
<a href="?sort=date_asc" class="btn btn-sm {% if sort=='date_asc' %}btn-primary{% else %}btn-secondary{% endif %}">📅 Дата ↑</a>
|
||
<a href="?sort=price_desc" class="btn btn-sm {% if sort=='price_desc' %}btn-primary{% else %}btn-secondary{% endif %}">💰 Сумма ↓</a>
|
||
<a href="?sort=price_asc" class="btn btn-sm {% if sort=='price_asc' %}btn-primary{% else %}btn-secondary{% endif %}">💰 Сумма ↑</a>
|
||
</div>
|
||
<div class="table-wrapper">
|
||
<table class="data-table">
|
||
<thead><tr><th>Номер</th><th>Дата</th><th>Поставщик</th><th>Материал</th><th>Кол-во</th><th>Стоимость товара, ₽</th><th>Транспорт, ₽</th><th class="highlight-col">ИТОГО, ₽</th><th>Действия</th></tr></thead>
|
||
<tbody>
|
||
{% for o in orders %}
|
||
<tr>
|
||
<td><strong>{{ o.number }}</strong></td>
|
||
<td>{{ o.order_date }}</td>
|
||
<td>{{ o.supplier_name }}</td>
|
||
<td>{{ o.material_name }}</td>
|
||
<td>{{ o.quantity }} {{ o.unit }}</td>
|
||
<td>{{ "%.2f"|format(o.goods) }}</td>
|
||
<td>{{ "%.2f"|format(o.transport) }}</td>
|
||
<td class="highlight-col"><strong>{{ "%.2f"|format(o.total) }}</strong></td>
|
||
<td><a href="{{ url_for('income_edit', oid=o.id) }}" class="btn btn-sm btn-edit">✏️ Изменить</a></td>
|
||
</tr>
|
||
{% else %}
|
||
<tr><td colspan="9" style="text-align:center;padding:2rem;color:#aaa">Накладных пока нет</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="table-meta">Всего: <strong>{{ orders|length }}</strong></div>
|
||
{% endblock %}
|