diff --git a/A00_Common/calc_sheet.ts b/A00_Common/calc_sheet.ts index b7e9217af..cb14d8581 100644 --- a/A00_Common/calc_sheet.ts +++ b/A00_Common/calc_sheet.ts @@ -16,6 +16,7 @@ import { el } from "@ui/ui_template_elements"; import { createInputField, createSelectField } from "@ui/ui_template_input"; import { currentLanguageIndex } from "@ui/ui_template_locale"; import { createText } from "@ui/ui_template_text"; +import { formatLineMoney, formatMoney } from "../common_util/common_util_money"; import "./calc_sheet.css"; export interface SheetLine { @@ -148,7 +149,7 @@ const t = (k: keyof typeof TEXT): string => TEXT[k][currentLanguageIndex as 0 | const bundleName = (b: string): string => (b in TEXT ? t(b as keyof typeof TEXT) : b); const won = (v: number | null, digits = 0): string => - v === null ? "-" : v.toLocaleString("ko-KR", { maximumFractionDigits: digits }); + v === null ? "-" : digits ? formatLineMoney(v) : formatMoney(v); const out = (v: number | null, key = false, digits = 0): HTMLElement => el("span", { className: `ui-calc-row__out${key ? " is-key" : ""}`, text: won(v, digits) }); diff --git a/resources/tester/test_719_4_sangeun_sheet.py b/resources/tester/test_719_4_sangeun_sheet.py index 6308c46fd..540aefc77 100644 --- a/resources/tester/test_719_4_sangeun_sheet.py +++ b/resources/tester/test_719_4_sangeun_sheet.py @@ -36,6 +36,7 @@ def made(): def _ts(sg, machines): files = [ + "common_util/common_util_money.ts", "B09_Estimation/B09_Estimation_Calc_Base.ts", "A00_Common/calc_sheet.ts", "B09_Estimation/B09_Estimation_UI_Tabs_Sangeun_Sheet.ts",