fix(est): preserve links and formula precision
This commit is contained in:
@@ -16,6 +16,21 @@ const EstSettings = (() => {
|
||||
type: "number",
|
||||
value: project.options.EstDigits || 0,
|
||||
},
|
||||
{
|
||||
name: "costTrunc",
|
||||
value: project.options.CostValueTrunc ? "1" : "0",
|
||||
label: "단가산출 성분 금액 절사",
|
||||
choices: [
|
||||
["0", "소수 1자리"],
|
||||
["1", "원 미만"],
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "midCost",
|
||||
label: "단가산출 중간금액 소수자리",
|
||||
type: "number",
|
||||
value: project.options.MidCostDiget ?? 2,
|
||||
},
|
||||
{
|
||||
name: "total",
|
||||
value: project.options.TotalFix ? "1" : "0",
|
||||
@@ -72,12 +87,18 @@ const EstSettings = (() => {
|
||||
},
|
||||
],
|
||||
(values) => {
|
||||
if (![values.head, values.estimate].every((n) => Number.isInteger(n) && n >= 0 && n <= 6))
|
||||
if (
|
||||
![values.head, values.estimate, values.midCost].every(
|
||||
(n) => Number.isInteger(n) && n >= 0 && n <= 6,
|
||||
)
|
||||
)
|
||||
throw Error("소수 자릿수는 0~6 정수입니다.");
|
||||
EstApp.change(() =>
|
||||
Object.assign(project.options, {
|
||||
HeadDigits: values.head,
|
||||
EstDigits: values.estimate,
|
||||
CostValueTrunc: values.costTrunc === "1",
|
||||
MidCostDiget: values.midCost,
|
||||
TotalFix: values.total === "1",
|
||||
TotalFit: values.fit === "1",
|
||||
DollarCostCut: values.dollar === "1",
|
||||
|
||||
Reference in New Issue
Block a user