fix(B08): 물량 0 인 구조물을 내역에서 뺌 — 0 원 줄이 만들어지던 자리

물넘이포장이 면적을 못 받아 「0.0 ㎡」로 내역에 서고 있었음. 코드가 붙어 있어
0 원 줄이 만들어지고 화면에는 값이 있는 줄로 보임 — 0 은 「없음」과 구별이 안 됨.
줄은 그대로 넘기되 in_bill False + 까닭(원단위 사유 그대로) + input_missing 로 둠.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-09 13:13:54 +09:00
co-authored by Claude Opus 5
parent e71147c1b2
commit ac8e8f1e59
@@ -408,6 +408,19 @@ def _structure_rows(
bill_quantity = float(structure.get("billing_quantity") or 0.0) bill_quantity = float(structure.get("billing_quantity") or 0.0)
else: else:
bill_unit, bill_quantity = "m", length bill_unit, bill_quantity = "m", length
# ⚠⚠ **물량 0 을 내역에 세우지 않는다**(2026-09-09 감사). 물넘이포장이 면적을 안 받아
# `0.0 ㎡` 로 서고 있었다 — 코드가 붙어 있어 **0 원 줄**이 만들어지고, 화면에는
# 「값이 있는 줄」로 보인다. 0 은 「없음」과 구별이 안 된다(오늘 표토에서 겪은 자리).
# ⇒ 줄은 그대로 넘기되 **내역에서 빼고 까닭을 적는다.**
in_bill = bill_quantity > 0
zero_reason = ""
if not in_bill:
notes = "; ".join(str(note) for note in (structure.get("notes") or []))
zero_reason = (
f"물량이 0 이라 내역에 안 세움 — {notes}"
if notes
else "물량이 0 이라 내역에 안 세움 — 저장 제원에서 치수·면적을 넣으면 값이 섭니다"
)
rows.append( rows.append(
{ {
"work_item_code": code, "work_item_code": code,
@@ -431,8 +444,8 @@ def _structure_rows(
# 철근이 있나 없나로 자동 판정 — 사람이 고르는 값이 아니다. # 철근이 있나 없나로 자동 판정 — 사람이 고르는 값이 아니다.
"structure_kind": kind, "structure_kind": kind,
# ⚠ 줄마다 **왜 막혔는지**를 싣는다 — 안 실으면 받는 쪽 화면이 빈다. # ⚠ 줄마다 **왜 막혔는지**를 싣는다 — 안 실으면 받는 쪽 화면이 빈다.
"blocked_kind": blocked_kind, "blocked_kind": blocked_kind or (BLOCKED_INPUT_MISSING if not in_bill else None),
"blocked_reason": blocked_reason, "blocked_reason": blocked_reason or zero_reason,
# 규격 갈래(뒷길이 …㎝ 이하) — 못 고르면 사유가 남는다. # 규격 갈래(뒷길이 …㎝ 이하) — 못 고르면 사유가 남는다.
# ⚠ **갈래 키 문자열을 우리가 조립하지 않는다** (2026-09-07 계약 변경). # ⚠ **갈래 키 문자열을 우리가 조립하지 않는다** (2026-09-07 계약 변경).
# 품셈 원문이 물결표를 섞어 쓴다(`` U+223C / `` U+FF5E). 두 창이 각자 # 품셈 원문이 물결표를 섞어 쓴다(`` U+223C / `` U+FF5E). 두 창이 각자
@@ -447,8 +460,8 @@ def _structure_rows(
"spec_class_basis": class_basis, "spec_class_basis": class_basis,
# ⚠ 물량을 못 채운 조각 — 0 으로 적지 않고 사유와 함께 드러낸다. # ⚠ 물량을 못 채운 조각 — 0 으로 적지 않고 사유와 함께 드러낸다.
"composite_not_ready": parts_missing or None, "composite_not_ready": parts_missing or None,
"in_bill": True, "in_bill": in_bill,
"in_bill_reason": (composite or {}).get("why", ""), "in_bill_reason": zero_reason or (composite or {}).get("why", ""),
"origin": ORIGIN_STRUCTURE, "origin": ORIGIN_STRUCTURE,
} }
) )