feat: KS-3 official Word form with marker template and single-table flow

Rewrite the KS-3 print renderer on the DOC-C4–DOC-C7 architecture:

- working marker template ks3_ru_markers.docx from the official blank;
  static fields via named markers, values only from KS3ExportHeader/Item
- one dynamic works table with w:tblHeader page-break repetition, no
  page/subtable split; final Итого block once at the end, VAT rows left
  empty (unsupported by the DTO)
- unified money formatter (space thousands, comma decimals)
- UI keeps only КС-3 (Word); Excel endpoint remains for internal tests
- DB, KS3↔KS2 links, issue/cancel, payments and KS-2 untouched
This commit is contained in:
Арсентьев Александр
2026-10-03 22:01:37 +03:00
parent bd64bb6307
commit 2b309b007c
6 changed files with 721 additions and 304 deletions
+5 -2
View File
@@ -192,8 +192,11 @@ def test_ks3_export_key_values(tmp_path):
word = client.get(f"/projects/{data['pid']}/ks3/{data['ks3_id']}/export/word")
assert word.status_code == 200
_, wtext = _word_text(word)
assert "КС-3 № 3" in wtext
assert "500.00" in wtext
# Official form (DOC-C8): marker-template KS-3 Word
assert "Унифицированная форма № КС-3" in wtext
assert "0322001" in wtext
assert "DOG-2026-7" in wtext
assert "500,00" in wtext
finally:
_clear()
engine.dispose()