feat: deliver schema 15 monthly settlement lifecycle

This commit is contained in:
2026-10-17 15:19:46 +09:00
parent dda76b3bbd
commit 38a854d525
79 changed files with 4003 additions and 1831 deletions
+24
View File
@@ -0,0 +1,24 @@
from pathlib import Path
from jarca_ledger_mcp.db import init_db
from jarca_ledger_mcp.application import settlement_draft_service as service
def test_cancelled_draft_does_not_reserve_create_key_for_new_draft(tmp_path: Path):
db = str(tmp_path / "ledger.sqlite3")
init_db(db)
first = service.create_settlement_draft("2026-09", "actor", "same-key", db_path=db)
assert first["success"]
cancelled = service.cancel_settlement_draft(first["draft"]["id"], 1, "actor", "restart", db_path=db)
assert cancelled["success"]
second = service.create_settlement_draft("2026-09", "actor", "new-key-after-cancel", db_path=db)
assert second["success"]
assert second["draft"]["id"] != first["draft"]["id"]
def test_dashboard_exposes_the_five_state_entry_labels():
source = Path(__file__).parents[1].joinpath("dashboard/page_views/settlement_drafts.py").read_text()
for label in ("정산시작", "이어서작업", "마감내역보기", "정정시작", "정정이어서작업"):
assert label in source
assert "검토·승인·마감·취소·평가" not in source