diff --git a/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py b/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py index 19f02bbf..0b19c353 100644 --- a/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py +++ b/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py @@ -406,9 +406,16 @@ def _structure_rows( #: (넣으려면 돌쌓기 일위대가에 타설 품이 있는지부터 확인할 것 — B09 ㉢ 과 같은 자리.) PLACING_TARGET_NAMES = frozenset({"콘크리트", "버림콘크리트", "레미콘"}) -#: 버림 타설 줄의 갈래 이름 — **실무 내역 표기 그대로**(「레미콘타설(장비) 무근,버림」). -#: ⚠ 버림은 늘 무근이라 구조물 종류(무근/철근)를 따라가지 않는다. -BLINDING_PLACING_KIND = "무근,버림" +#: 버림 타설 줄에 **표시**할 이름 — 실무 내역 표기 그대로(「레미콘타설(장비) 무근,버림」). +#: ⚠⚠ **표시 문구일 뿐 갈래가 아니다.** 품셈 12-1-1 의 갈래는 무근/철근/소형 셋뿐이고 +#: **「버림」이라는 열이 없다.** 실무도 줄 이름만 「무근,버림」이고 품은 무근 것을 쓴다 +#: (봉화 제50호표 단가가 「무근」과 같음). +#: ⇒ `variant_value`·`structure_kind` 는 **「무근구조물」 그대로** 보내고 여기 이름은 +#: `spec` 에만 쓴다. 갈래 축에 없는 값을 보내면 받는 쪽이 단가를 못 고른다 +#: (2026-09-09 실측: 275,584원이 통째로 빠졌다). +BLINDING_PLACING_LABEL = "무근,버림" +#: 버림이 실제로 쓰는 품셈 갈래 — 무근이다. +BLINDING_PLACING_KIND = "무근구조물" def _placing_rows( @@ -449,13 +456,20 @@ def _placing_rows( volume = float(component.get("amount") or 0.0) if volume <= 0: continue - kind = BLINDING_PLACING_KIND if name == "버림콘크리트" else structure_kind(structure) - buckets[kind] = buckets.get(kind, 0.0) + volume + # (갈래, 표시 이름) 으로 담는다 — 갈래는 품셈 축, 표시는 실무 줄 이름. + if name == "버림콘크리트": + key = (BLINDING_PLACING_KIND, BLINDING_PLACING_LABEL) + else: + kind = structure_kind(structure) + key = (kind, kind) + buckets[key] = buckets.get(key, 0.0) + volume rows = [ { "work_item_code": code, "name": "콘크리트 타설", - "spec": kind, + # ⚠ 표시 이름과 갈래를 **가른다** — 표시는 실무 줄 이름(「무근,버림」), + # 갈래(`variant_value`)는 품셈 축(무근/철근/소형)이라야 단가가 붙는다. + "spec": label, "unit": "㎥", "quantity": volume, "quantity_gross": None, @@ -468,7 +482,7 @@ def _placing_rows( "station_from": None, "station_to": None, "excavation_method": None, - "spec_detail": kind, + "spec_detail": label, "composite_parts": None, "structure_kind": kind, "blocked_kind": None, @@ -485,7 +499,7 @@ def _placing_rows( "in_bill_reason": "", "origin": ORIGIN_STRUCTURE, } - for kind, volume in sorted(buckets.items()) + for (kind, label), volume in sorted(buckets.items()) ] notes: list[str] = [] if rows and used_default: