feat: official KS-2 Excel/Word forms with template markers and single-table flow

Replace the simplified KS-2 exports with the official unified form:

- Excel: official blank as working template, merge-safe row insertion,
  compact layout, header/signer polish, 0.00 money format
- Word: official blank via named template markers (DOC-C4), one dynamic
  works table with repeating header rows, separate closing totals block
  (Итого / Всего по акту), system group rows merged across 8 columns
- Word money formatter (space thousands, comma decimals) and split
  contract date day/month/year boxes
- Issue persists both xlsx and docx artifacts; UI keeps Excel and adds
  Word download
- Daily reports: multi-system item selection in the form

Regression tests for renderers, artifacts and layout; docs/tasks +
docs/implementation for the DOC-C* series.
This commit is contained in:
Арсентьев Александр
2026-10-03 19:48:29 +03:00
parent 79c7d4f335
commit bd64bb6307
49 changed files with 6917 additions and 353 deletions
+3 -8
View File
@@ -30,14 +30,9 @@
<p><strong>Комментарий:</strong> {{ document.comment }}</p>
{% endif %}
<div class="mt-2">
<a href="/projects/{{ project.id }}/ks2/{{ document.id }}/export/excel" class="btn btn-outline-success btn-sm">📊 Excel</a>
<a href="/projects/{{ project.id }}/ks2/{{ document.id }}/export/word" class="btn btn-outline-primary btn-sm">📄 Word</a>
{% if document.status != 'draft' %}
<a href="/projects/{{ project.id }}/ks2/{{ document.id }}/artifact" class="btn btn-outline-dark btn-sm">
📎 Официальная форма (Excel)
{% if document.status == 'cancelled' %}<span class="badge bg-danger ms-1">СТОРНИРОВАН</span>{% endif %}
</a>
{% endif %}
<a href="/projects/{{ project.id }}/ks2/{{ document.id }}/export/excel" class="btn btn-outline-success btn-sm">КС-2 (Excel)</a>
<a href="/projects/{{ project.id }}/ks2/{{ document.id }}/export/word" class="btn btn-outline-primary btn-sm">КС-2 (Word)</a>
{% if document.status == 'cancelled' %}<span class="badge bg-danger ms-1">СТОРНИРОВАН</span>{% endif %}
</div>
</div>
</div>