feat: add KS-3/payments, tech debt fixes, UI polish, and KS-2 Excel/Word export

Tasks 008-016: KS-6a journal, KS-3 documents, payments with allocations,
tech debt cleanup, financial privacy, document tree, storno mechanism,
row-click UI, BOQ collapse/sticky header, and KS-2 export to Excel/Word
via shared DTO architecture.
This commit is contained in:
Арсентьев Александр
2026-09-27 13:38:45 +03:00
parent 6c608a8779
commit 9cfb341774
57 changed files with 7163 additions and 50 deletions
+59
View File
@@ -0,0 +1,59 @@
{% extends "base.html" %}
{% block title %}Платежи — {{ project.name }}{% endblock %}
{% block content %}
<div class="container mt-4">
<nav class="mb-3">
<a href="/projects/{{ project.id }}" class="btn btn-outline-secondary btn-sm">&larr; К проекту</a>
</nav>
<div class="row">
<div class="col-12">
<h2>Платежи проекта {{ project.name }}</h2>
<a href="/projects/{{ project.id }}/payments/new" class="btn btn-primary mb-3">Новый платёж</a>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Дата</th>
<th>Номер документа</th>
<th class="text-end text-nowrap">Сумма</th>
<th>Валюта</th>
<th class="text-end text-nowrap">Распределено</th>
<th class="text-end text-nowrap">Не распределено</th>
<th>КС-3</th>
<th>Комментарий</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr class="clickable-row" data-url="/projects/{{ project.id }}/payments/{{ row.payment.id }}">
<td>{{ row.payment.date.strftime('%d.%m.%Y') }}</td>
<td>{{ row.payment.document_number or '—' }}</td>
<td class="text-end text-nowrap money-value">{{ row.payment.amount | money(row.payment.currency) }}</td>
<td>{{ row.payment.currency }}</td>
<td class="text-end text-nowrap money-value">{{ row.allocated | money(row.payment.currency) }}</td>
<td class="text-end text-nowrap money-value">{{ row.unallocated | money(row.payment.currency) }}</td>
<td>{{ row.ks3_count }}</td>
<td>{{ row.payment.comment or '' }}</td>
<td>
<a href="/projects/{{ project.id }}/payments/{{ row.payment.id }}" class="btn btn-sm btn-outline-primary">Просмотр</a>
<a href="/projects/{{ project.id }}/payments/{{ row.payment.id }}/edit" class="btn btn-sm btn-outline-secondary">Редактировать</a>
<form method="post" action="/projects/{{ project.id }}/payments/{{ row.payment.id }}/delete" class="d-inline">
<button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('Удалить платёж?')">Удалить</button>
</form>
</td>
</tr>
{% else %}
<tr><td colspan="9" class="text-center text-muted py-4">Платежей пока нет.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}