diff --git a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py index fb2d04fe..19ec51ac 100644 --- a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py +++ b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py @@ -250,14 +250,21 @@ def _leaf_row( if covered is not None: # ⚠ **일부 몫만 선 단가는 안 붙인다.** 「인력(10%)·장비(90%)」 표에서 인력만 # 붙은 값을 전량에 곱하면 내역서가 조용히 틀린다 — 0 으로 때우는 것과 같은 사고다. - row.note = f"단가가 일부만 섰습니다 — 붙은 몫 {covered}% (나머지는 시공능력 공식 몫)." + # 무엇이 없어서 못 붙었는지까지 적는다 — 「붙은 몫 0%」만으로는 어디를 손볼지 모른다. + why = unit_prices.component_gaps.get(node.code) or "" + missing_rows = unit_prices.unattached.get(node.code) or [] + if not why and missing_rows: + why = f"{', '.join(missing_rows[:3])} 줄이 아직 안 붙었습니다" + row.note = ( + f"단가가 일부만 섰습니다 — 붙은 몫 {covered}%" + (f" · {why}" if why else "") + "." + ) result.missing.append( { "name": row.name, "code": node.code, "unit": row.unit, "quantity": str(item.quantity), - "reason": f"단가 일부만 섬(붙은 몫 {covered}%)", + "reason": f"단가 일부만 섬(붙은 몫 {covered}%)" + (f" — {why}" if why else ""), } ) return row