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:
@@ -89,7 +89,7 @@ def test_reset_deletes_db_rows_and_storage(storage_root, db_session):
|
||||
pid = _seed_project_with_artifact(db_session)
|
||||
storage_dir = project_storage_path(pid)
|
||||
assert storage_dir.is_dir()
|
||||
assert db_session.query(DocumentArtifact).count() == 1
|
||||
assert db_session.query(DocumentArtifact).count() == 2 # xlsx + docx
|
||||
|
||||
result = reset_database(db_session)
|
||||
|
||||
@@ -262,7 +262,7 @@ def test_export_reset_import_artifacts_survive(storage_root, db_session):
|
||||
assert result.storage_removed is True
|
||||
|
||||
imported = import_project(db_session, data)
|
||||
art = db_session.query(DocumentArtifact).filter_by(project_id=imported.id).one()
|
||||
art = db_session.query(DocumentArtifact).filter_by(project_id=imported.id, format="xlsx").one()
|
||||
path = resolve_storage_path(art.storage_key)
|
||||
assert path.is_file()
|
||||
# New project storage exists
|
||||
|
||||
Reference in New Issue
Block a user