fix(B09): 중기경비계산서에 갈래 표시 — 같은 기종이 두 장으로 보이던 자리
조합 사용이면 본체 잡재료가 16% 로 줄어 재료비가 달라져 층이 따로 섬(굴착기 0.7 재료비 26,130 → 24,845). 갈래를 안 적어 똑같은 장이 두 번 나온 것처럼 읽혔음. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,9 @@ from B09_Estimation.B09_Estimation_MachineCost import (
|
||||
)
|
||||
from B09_Estimation.B09_Estimation_PriceBook import PriceKind
|
||||
|
||||
#: 조합 사용(굴착기+부착장비)일 때의 본체 잡재료비율 — 품셈 제8장 [주]⑤.
|
||||
COMBINED_MISC_PERCENT = 16
|
||||
|
||||
_CATALOG_SUBPATH = ("resources", "data_cost_input_value")
|
||||
_THOUSAND = Decimal(1000)
|
||||
_ZERO = Decimal(0)
|
||||
@@ -93,7 +96,7 @@ def machine_expense_sheets(build: Any) -> list[dict[str, Any]]:
|
||||
for code, title in sorted(build.book.titles.items()):
|
||||
if title.kind is not PriceKind.MACHINE_HOURLY:
|
||||
continue
|
||||
machine_code = code[2:].split("#")[0]
|
||||
machine_code, _, variant = code[2:].partition("#")
|
||||
machine = catalog.machines.get(machine_code)
|
||||
if machine is None:
|
||||
continue
|
||||
@@ -121,6 +124,10 @@ def machine_expense_sheets(build: Any) -> list[dict[str, Any]]:
|
||||
"machine_code": machine_code,
|
||||
"name": machine.name,
|
||||
"spec": machine.specification,
|
||||
# ⚠ 같은 기종이 **두 장**일 수 있다 — 조합 사용이면 잡재료가 16% 로 줄어
|
||||
# 재료비가 달라지므로 층이 따로 선다(품셈 제8장 [주]⑤). 갈래를 안 적으면
|
||||
# 똑같은 장이 두 번 나온 것처럼 읽힌다.
|
||||
"variant": variant,
|
||||
# ① 손료
|
||||
"price_thousand_krw": _money(machine.price_thousand_krw),
|
||||
"economic_life_hours": raw.get("economic_life_hours"),
|
||||
@@ -138,7 +145,9 @@ def machine_expense_sheets(build: Any) -> list[dict[str, Any]]:
|
||||
"fuel_liters_per_hour": _money(fuel_liters),
|
||||
"fuel_price_per_liter": _money(fuel_price),
|
||||
"fuel_scope": fuel_meta.get("region_name") or "전국 공시가",
|
||||
"misc_material_percent": _money(misc_percent),
|
||||
"misc_material_percent": (
|
||||
str(COMBINED_MISC_PERCENT) if variant else _money(misc_percent)
|
||||
),
|
||||
"operator_code": occupation,
|
||||
"operator_daily_wage": _money(wage),
|
||||
"operator_krw_per_hour": _money(
|
||||
|
||||
Reference in New Issue
Block a user