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:
@@ -22,6 +22,7 @@ import {
|
||||
} from "./M02_MasterTemplete_Hopyo_Api";
|
||||
import type { LaborDoc } from "./M02_MasterTemplete_Labor_Api";
|
||||
import { lineId } from "./M02_MasterTemplete_Labor_Calc";
|
||||
import { formatMoney } from "../common_util/common_util_money";
|
||||
|
||||
type Kind = "노임" | "자재";
|
||||
const COST: Record<Kind, "노무비" | "재료비"> = { 노임: "노무비", 자재: "재료비" };
|
||||
@@ -37,8 +38,7 @@ export interface RelinkSource {
|
||||
price?: (kind: Kind, key: string) => number | null | undefined;
|
||||
}
|
||||
|
||||
const won = (v: number | null | undefined): string =>
|
||||
v == null ? "-" : Math.round(v).toLocaleString("ko-KR");
|
||||
const won = (v: number | null | undefined): string => (v == null ? "-" : formatMoney(v));
|
||||
|
||||
/** 사전조합 여럿(붙여넣기 · 실무자료 들여오기 뒤) — 서버가 쓰고 전후 1 단위 값 */
|
||||
export function relinkKeys(keys: string[]): RelinkSource {
|
||||
@@ -152,11 +152,11 @@ export async function openRelink(src: RelinkSource): Promise<void> {
|
||||
{ key: "pick", label: "고름", width: 44 },
|
||||
{ key: "unit", label: "단위", width: 44 },
|
||||
{ key: "qty", label: "수량", kind: "number", decimals: 4, trim: true, width: 60 },
|
||||
{ key: "pasted", label: "붙인 단가", kind: "number", decimals: 1, width: 84 },
|
||||
{ key: "pasted", label: "붙인 단가", kind: "number", decimals: 3, trim: true, width: 84 },
|
||||
{ key: "now", label: src.priceLabel, width: 84 },
|
||||
{ key: "cand", label: "이음 후보 (누름 = 다음)", width: 210 },
|
||||
{ key: "price", label: "후보 단가", kind: "number", decimals: 1, width: 84 },
|
||||
{ key: "gap", label: "금액 차이", kind: "number", decimals: 1, width: 84 },
|
||||
{ key: "price", label: "후보 단가", kind: "number", decimals: 3, trim: true, width: 84 },
|
||||
{ key: "gap", label: "금액 차이", kind: "number", decimals: 1, trim: true, width: 84 },
|
||||
],
|
||||
rows: data,
|
||||
frozen: 1,
|
||||
|
||||
Reference in New Issue
Block a user