feat(b09): 원가계산 화면 새 틀 — 설계내역서·일위대가·단가산출근거 탭(실무 서식 · 내역 → 호표 → 산근 들어가기)
- 틀 B09_Estimation_UI_Shell: 탭 줄과 등록만 · 탭마다 파일 하나(계약 _Shell_Types) - 설계내역서: 실무 열(합계/노무/재료/경비 단가·금액) · 머리글 접기·레벨 고르개 · 줄 누르면 제 N 호표 · 단산 N 단추 · 미확정 빨간 테두리 - 일위대가·단가산출근거: 목록표(내역에 처음 쓰인 차례) + 본표 · 줄 누르면 하위 호표·산근·중기로 · 자취 눌러 되돌아감 · Q 식 글자 그대로 - 옛 탭 여섯(원가계산서·중기·관급사급·기초자료·설계서 구성·산출기초)은 옛 코드 그대로 이어 붙임 — 새 탭 파일이 서면 등록 한 줄씩 바꿈 - 본표 합계 줄 = 호표 성분 소계 원 미만 절사 값 · 비율 줄 금액도 0.1원 절사 표시 - 사전 ui_template_locale_b3 새 벌(b2 700줄 넘음) - 검증: ORCA 검증 프로젝트 — 본체 122,848,989 · 지장목제거 865·15,460,837 · 제 9 호표 합계 1,708 = 산근 8호표 합계 1,708 · 옛 탭 여섯 다 뜸 · 접기 53→51·레벨1 11줄 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -14,7 +14,7 @@ from decimal import Decimal
|
||||
|
||||
from B09_Estimation.B09_Estimation_MachineOperating import load_fuel_price
|
||||
from B09_Estimation.B09_Estimation_MaterialCatalog import catalog_summary, load_material_catalog
|
||||
from B09_Estimation.B09_Estimation_PriceBook import PriceKind
|
||||
from B09_Estimation.B09_Estimation_PriceBook import TRUNCATED_KINDS, PriceKind
|
||||
from B09_Estimation.B09_Estimation_Rounding import OutputPlace, round_at
|
||||
from B09_Estimation.B09_Estimation_UnitPrice import (
|
||||
DRILLABLE_KINDS,
|
||||
@@ -202,7 +202,7 @@ def detail_of(build: UnitPriceBuild, code: str) -> dict:
|
||||
"quantity": str(detail.percent_of_labor),
|
||||
"material": "0",
|
||||
"labor": "0",
|
||||
"expense": str(amount),
|
||||
"expense": _money_text(amount),
|
||||
"total": _money_text(amount),
|
||||
"source": "품셈 [주]",
|
||||
"drillable": False,
|
||||
@@ -233,7 +233,7 @@ def detail_of(build: UnitPriceBuild, code: str) -> dict:
|
||||
"spec": f"{'주연료비' if misc else '주재료비'}의 {detail.percent_of_material}%",
|
||||
"unit": "%",
|
||||
"quantity": str(detail.percent_of_material),
|
||||
"material": str(amount),
|
||||
"material": _money_text(amount),
|
||||
"labor": "0",
|
||||
"expense": "0",
|
||||
"total": _money_text(amount),
|
||||
@@ -285,16 +285,22 @@ def detail_of(build: UnitPriceBuild, code: str) -> dict:
|
||||
# ㉤ 열 방향 검사 — 같은 성분을 두 층에서 세면 여기서 멈춘다.
|
||||
# 행 방향(`TC=NC+GC+JC`)만으로는 안 잡히는 어긋남이다.
|
||||
check_column_sums(rows=rows, totals=summed, label=f"{title.name} 본표")
|
||||
# 합계 줄 — 호표 안에서 자르는 층(X·D·B)은 **성분 소계 원 미만 절사** 값(실무 표 합계 줄 · 명세 7장).
|
||||
shown = (
|
||||
{"material": money.material, "labor": money.labor, "expense": money.expense}
|
||||
if title.kind in TRUNCATED_KINDS
|
||||
else {key: summed[key] for key in ("material", "labor", "expense")}
|
||||
)
|
||||
return {
|
||||
"code": code,
|
||||
"name": title.name,
|
||||
"spec": title.spec,
|
||||
"unit": title.unit,
|
||||
"kind": title.kind.value,
|
||||
"material": str(summed["material"]),
|
||||
"labor": str(summed["labor"]),
|
||||
"expense": str(summed["expense"]),
|
||||
"total": str(summed["total"]),
|
||||
"material": str(shown["material"]),
|
||||
"labor": str(shown["labor"]),
|
||||
"expense": str(shown["expense"]),
|
||||
"total": str(sum(shown.values(), Decimal(0))),
|
||||
# TC = NC + GC + JC 가 성립하는지 화면이 스스로 보이게 한다.
|
||||
"sum_matches": summed["total"] == summed["material"] + summed["labor"] + summed["expense"],
|
||||
# 전정밀 합과의 차이 — 행별 절사 탓에 끝자리가 어긋나는 것은 **정상**이다.
|
||||
|
||||
Reference in New Issue
Block a user