fix(751-1): 원화 꼴 흠 — M01 · M02 · 서버 글 — 공용 꼴 갈음 · 율 「4.0」 · 중간 값 · 마법사 콤마 · 서고 금액

- 파이썬 짝을 common_util/common_util_money.py 로 옮김(TS 와 같은 이름 · 서버 어디서나 불러옴)
- 시험 계산: 율 글자 「4.0 %」 → 숫자 4(서버 _pct) · 중간 값 경비 · 공구손료 등 비목 이름은 1,000 미만도 돈 꼴(870.2455 → 870)
- 기초 편집 단가 = 공용 단가 꼴 · 금액 = 소수 1 · 서고 기준 금액 · 구조물 조합 일위대가 금액 = 공용 정수 꼴(124,419.85 → 124,420)
- 마법사(확인 · 고르기 · 별칭 장부 · 엑셀 · 우리 금액): 콤마 없음 · 소수 셋 기본 · 부동소수 꼬리 걷음 · 품 비교 꼬리표 지수 꼴(1.235e+05) 걷음
- 다시 잇기 · 붙여넣기 대조 · 찾아 넣기 금액 열 끝 0 없음(22.9 원이 23 으로 숨지 않음) · 흐름 로직 텍스트 수식 비목 소계 정수
- 낡은 시험 고침: test_m02_hopyo_screen 품 비교 보통인부 0.0364 → 0.03636(수량 꼴 유효숫자 넷 규칙으로 파이썬 · TS 통일)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 22:54:02 +09:00
co-authored by Claude Sonnet 5.5
parent 27f33a8c53
commit 9e0746058e
25 changed files with 72 additions and 45 deletions
+2 -2
View File
@@ -13,6 +13,7 @@
import "./ui_template_group_cards.css";
import { createButton } from "./ui_template_elements";
import { formatLineMoney } from "../common_util/common_util_money";
/** 비목 셋 — 노무 · 재료 · 경비 */
export type GroupParts = [number | null, number | null, number | null];
@@ -81,9 +82,8 @@ export const PART_LABELS = ["노무", "재료", "경비"] as const;
export const clampColumns = (value: unknown): number =>
GROUP_COLUMNS.includes(value as 1) ? (value as number) : 2;
const won = new Intl.NumberFormat("ko-KR", { maximumFractionDigits: 1 });
const plain = (value: number | null | undefined): string =>
value === null || value === undefined || !Number.isFinite(value) ? "" : won.format(value);
value === null || value === undefined || !Number.isFinite(value) ? "" : formatLineMoney(value);
/** 줄 비목 풍선 — 「노무 1,234 · 재료 0 · 경비 56」 · 셋 다 빈칸 = 없음 */
export function partsTip(
+2 -2
View File
@@ -53,6 +53,7 @@ import { createEditView, type EditView } from "./ui_template_item_picker_edit";
import { createComboTable } from "./ui_template_item_picker_table";
import { createToolbar } from "./ui_template_toolbar";
import { createText } from "./ui_template_text";
import { formatMoney } from "../common_util/common_util_money";
export type { SummaryItem } from "./ui_template_item_picker_data";
@@ -212,8 +213,7 @@ export function openItemPicker(opts: ItemPickerOptions): Promise<ItemPickerResul
const spec = chosen ? specOf(chosen) : null;
specHost.hidden = !spec || spec.열.length < 2;
if (!spec || specHost.hidden) return void specHost.replaceChildren();
const sum = (n: number | null): string =>
n === null ? "" : ` · ${n.toLocaleString("ko-KR", { maximumFractionDigits: 0 })}`;
const sum = (n: number | null): string => (n === null ? "" : ` · ${formatMoney(n)}`);
const buttons = spec.열.map((col) => {
const button = createButton({
label: `${spec.이름}=${col.이름}${sum(col.합계)}`,
@@ -15,6 +15,7 @@
import { createButton, el, showConfirmDialog, showToast } from "./ui_template_elements";
import { readTemplate } from "../M02_MasterTemplete/M02_MasterTemplete_Api_Fetch";
import { formatMoney } from "../common_util/common_util_money";
import { dateText } from "../common_util/common_util_time";
import { calcLabor, type LaborDoc } from "../M02_MasterTemplete/M02_MasterTemplete_Labor_Api";
import type { EditKind, ItemCardsHandle } from "../M02_MasterTemplete/M02_MasterTemplete_ItemCards";
@@ -239,7 +240,7 @@ export function createItemDetail(opts: ItemDetailOptions): ItemDetail {
async function paintCalc(from: ProjectItemInfo, mine: number): Promise<void> {
const got = await calcCopy(from.폴더).then(summarize, () => null);
if (!got || mine !== seq) return;
const total = Math.round(got.total).toLocaleString();
const total = formatMoney(got.total);
status.append(
el("span", {
className: "ui-item-picker__calc",