fix(842-1): B09 고정 줄 이은 자재 별도 · 관급 = 자재대에 한 번 — 거창 안내판 줄 사라진 50,000 되살림

- 고정 줄 이은 자재가 별도 · 관급이면 대가 안 0 원 + 그 몫 `aside` → 집계 `aside` 줄(자재대 수량)
  (`Calc_Labor` py · ts 짝 `_fixed_apart` · `Summary._fixed_lines`) — 기본 표시는 M02 자재표시 그대로
- 거창 직접비 합 = 엑셀(384,916,227) · 견본 넷 사라진 재료 0 · 겹쳐 셈 0
- 지킴 시험 `test_842_1_b09_fixed_aside`(재료 · 고정 · 관급 · 기계 겸 · 거울) + `test_707_7` 전수 시험
- `test_707_7` 낡은 기대(거창 gap 50000 · 다시 부르기 384866227) 고침

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 18:16:21 +09:00
co-authored by Claude Sonnet 5.5
parent 1402d7eb4d
commit 5b65e9470d
5 changed files with 132 additions and 10 deletions
+11 -4
View File
@@ -139,14 +139,18 @@ def _none() -> dict[str, float | None]:
def _fixed(line: dict[str, Any], books: dict[str, Any]) -> dict[str, float | None]:
"""고정 줄 단가(705-1) — 줄 단가 그대로 · 이은 자재가 관급 · 별도계상이면 재료 0(841-1 단가 책
값으로 다시 안 덮음)."""
own, link = line.get("own") or {}, line.get("link") or {}
out = {part: num(own.get(part)) or 0.0 for part in PARTS}
row = books["material"].get(link.get("material")) if link.get("material") else None
if row and row.get("supply") in SUPPLY:
out = {part: num((line.get("own") or {}).get(part)) or 0.0 for part in PARTS}
if _fixed_apart(line, books):
out["material"] = 0.0
return out
def _fixed_apart(line: dict[str, Any], books: dict[str, Any]) -> bool:
"""고정 줄이 이은 자재가 관급 · 별도(842-1) — 대가 안 0 · 그 몫은 자재대(`aside`)로."""
key = (line.get("link") or {}).get("material")
return bool(key) and (books["material"].get(key) or {}).get("supply") in SUPPLY
def _base(spec: str, lines: list[dict[str, Any]], src: list) -> float | None:
"""% 줄 밑수 — `part:비목` 그 비목 줄 금액 합 · `lines:labor` 노무 줄 금액 합 ·
`line:이름` 그 줄 · `bundle:labor|material|machine` 그 종류 줄(+ 그 이음 고정 줄) 합 ·
@@ -212,6 +216,9 @@ def _block(
}
if line["kind"] == "material" and _apart(line, books): # 관급 · 별도계상 = 대가 안 0원
extra["aside"], prices["material"], amounts["material"] = amounts["material"], 0.0, 0.0
if line["kind"] == "fixed" and _fixed_apart(line, books): # 842-1 이은 자재 = 자재대 몫
mat = num((line.get("own") or {}).get("material")) or 0.0
extra["aside"] = None if qty is None else cut(mat * qty, line.get("place"))
ref = {"ref": {"key": line["key"]}} if line.get("key") else {} # 집계표(145-5) 이음
ask = {"why": line["ask"]} if qty is None and line.get("ask") else {} # 723-4
lines.append(