feat(M01): 원 단위 입력 자동값 null · 그 입력 쓰는 줄만 비움

- master_auto: 단위에 원이 든 수 입력은 0 대신 null
- master_formula: 비어 있는 입력을 쓰는 호표·덧줄 줄만 단가·금액 null + 까닭(입력 비어 있음) · 로직 계속
- 시험 test_m01_auto.py 둘 더함 · GF000056

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgUhN55Z3BCYhUJTjwTNfj
This commit is contained in:
2026-09-24 10:05:20 +09:00
co-authored by Claude Sonnet 5
parent bb4500b4c3
commit 7215770eb9
3 changed files with 44 additions and 3 deletions
+4 -1
View File
@@ -89,5 +89,8 @@ def values(master: mf.Master, row: dict) -> dict:
out[name] = spec["범위"][0]
else:
got = _lowest(master, finds.get(name, []))
out[name] = got if got is not None else Decimal(1 if name in divs else 0)
if got is None and "원" in str(spec.get("단위") or ""):
out[name] = None # 가격 입력 — 0 원처럼 보이지 않게 비워 둠
else:
out[name] = got if got is not None else Decimal(1 if name in divs else 0)
return out