Commit Graph

35 Commits

Author SHA1 Message Date
Арсентьев Александр 1af2a70406 fix: payments validation and in-place allocation edits
Close the KS-2 -> KS-3 -> Payment -> allocation -> aggregates chain for V1.
Two real defects fixed:

- NaN/Infinity payment or allocation amounts raised InvalidOperation (500)
  or were silently stored; they are now finite-value validation errors (400)
  via _parse_money / is_finite checks.
- Editing an allocation to the same KS-3 hit uq_payment_ks3 because
  clear() deferred the DELETE past the new INSERT; allocations are now
  updated in place.

Financial semantics unchanged: full active payment counts as received,
storno keeps historical allocations while excluding the payment from
active aggregates. Decimal arithmetic preserved.
2026-10-08 20:24:48 +03:00
Арсентьев Александр e7abc7c86c feat: Daily Report two-zone picker with pre-add quantity entry
Split the Daily Report form into a top position picker (system filter,
live search) and a bottom added-items list grouped by system, with
quantity edit and remove. Switching systems no longer drops the added
list; A1->B1->A2 keeps all three.

Quantity can be entered in the picker before pressing Добавить and is
carried into the selected list; removing a position returns it to the
picker with the typed quantity intact. Draft quantities of never-added
positions stay out of POST via a submit guard, so they never become
Daily Report facts. Server rows are always rendered client-filtered;
POST contract and apply_quantities unchanged.
2026-10-08 17:12:13 +03:00
Арсентьев Александр a8be9db476 chore: drop legacy export buttons from KS-2/KS-3 pages
UI cleanup after the Word print forms became the only export path:
remove КС-2 (Excel) from the KS-2 page and Официальная форма (Word)
from the KS-3 page. Keep КС-2 (Word), КС-3 (Word) and the red
СТОРНИРОВАН badge on cancelled KS-2. Excel renderer and export
endpoints stay as legacy fallbacks; no DB, model or business-logic
changes.
2026-10-04 12:41:53 +03:00
Арсентьев Александр bd64bb6307 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.
2026-10-03 19:48:29 +03:00
Арсентьев Александр 79c7d4f335 feat: add BOQ progress filter and fix horizontal table overflow 2026-10-01 12:38:01 +03:00
Арсентьев Александр bc69e52174 fix: agreement cancellation FIFO semantics, modal rendering, and list status badges 2026-09-30 22:50:11 +03:00
Арсентьев Александр 39adbf32e2 feat: collapse full KPI block on dashboard with details/summary 2026-09-30 18:59:06 +03:00
Александр Арсентьев a2a01e24e6 feat: add project requisites and agreement cancellation 2026-09-30 16:42:02 +03:00
Арсентьев Александр 3c8bbe8b4b feat: add agreement cancellation with conservative KS-2 usage guard 2026-09-30 15:57:40 +03:00
Арсентьев Александр 5222cb2b3c feat: delete project storage on database reset with safe FS cleanup 2026-09-30 13:34:00 +03:00
Арсентьев Александр 8302250325 feat: include document artifacts in project export/import round-trip 2026-09-30 12:24:49 +03:00
Арсентьев Александр bc0e04a482 feat: add official artifact download endpoints and UI for KS-2/KS-3 2026-09-30 11:20:47 +03:00
Арсентьев Александр c1be111e1a feat: persist issued document artifacts and invalidate draft artifacts on edit 2026-09-29 18:17:36 +03:00
Арсентьев Александр e66bce0d25 feat: add template-based KS-2 Excel and KS-3 Word renderers 2026-09-29 17:50:58 +03:00
Арсентьев Александр cddde114fe feat: add document artifact service for hash, persist, resolve, and invalidate 2026-09-29 16:17:54 +03:00
Арсентьев Александр adc92e3460 feat: add document artifact model, migration, and storage root config 2026-09-29 15:29:45 +03:00
Арсентьев Александр 11758a33e9 test: cover agreement export/reset/import round-trip and backward compatibility 2026-09-28 22:22:04 +03:00
Арсентьев Александр 9f7031232e test: cover agreement to daily report to KS-2 integration chain 2026-09-28 22:07:48 +03:00
Арсентьев Александр 1b5bad0baf feat: allow deleting draft agreements while keeping approved read-only 2026-09-28 21:55:29 +03:00
Арсентьев Александр 2821208c65 feat: enforce Daily Report lifecycle rules around KS-2 closed volume 2026-09-28 19:30:10 +03:00
Арсентьев Александр fac2816622 fix: include work journal in project export/import with old-archive compatibility 2026-09-28 17:45:39 +03:00
Арсентьев Александр b5fa601e93 feat: add atomic database reset that wipes project data while keeping schema 2026-09-28 11:39:27 +03:00
Арсентьев Александр 84c2a2e512 feat: add portable project export/import ZIP with checksums and atomic restore 2026-09-28 11:22:11 +03:00
Арсентьев Александр ea183854f8 feat: add payment stornation with history-preserving allocations and card layout fixes 2026-09-27 20:58:19 +03:00
Арсентьев Александр 94571f9684 feat: UI/UX cleanup V1 with header, import requisites, and status fixes 2026-09-27 20:22:13 +03:00
Арсентьев Александр 79d802d536 fix: make BOQ sticky header actually stick during scroll 2026-09-27 18:57:27 +03:00
Арсентьев Александр 9992a435b2 feat: enforce KS-2/KS-3 stornation integrity 2026-09-27 18:12:19 +03:00
Арсентьев Александр 80b7d4732e feat: auto-suggest KS-2/KS-3 document numbers 2026-09-27 17:39:22 +03:00
Арсентьев Александр b3741ca106 feat: polish document exports and fix filename extensions 2026-09-27 17:18:15 +03:00
Арсентьев Александр d8e92386d9 feat: add document package ZIP export 2026-09-27 14:58:51 +03:00
Арсентьев Александр 34fb98e69c feat: add KS-6a Excel/Word export 2026-09-27 14:32:36 +03:00
Арсентьев Александр 9cfb341774 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.
2026-09-27 13:38:45 +03:00
Арсентьев Александр 6c608a8779 feat: add KS-2 UI, reporting period, and table layout fixes
- 004: KS-2 UI (list, create, edit, view, issue) with integration tests
- 005: navigation buttons, financial column alignment, button layout
- 006: reporting_period_from/to fields with migration, validation, display
- 007: fixed table layout with colgroup, quantity2 filter, stable column widths
2026-09-26 21:36:43 +03:00
Александр Арсентьев 1f5eed2064 test: strengthen KS-2 regression coverage 2026-09-26 20:10:41 +03:00
Александр Арсентьев aa7f1d8f59 feat: complete KS-2 foundation and regression coverage 2026-09-26 17:41:09 +03:00