feat(est): print progress and adjustment costs

This commit is contained in:
2026-11-07 10:27:09 +09:00
parent e4b7322bb6
commit 5f9b5432ec
4 changed files with 76 additions and 4 deletions
+28 -2
View File
@@ -14,12 +14,19 @@ const EstForms = (() => {
errors: output.errors,
};
}
if (id === "progress-summary") {
if (["progress-summary", "progress-costs"].includes(id)) {
const round =
project.progress.find((item) => item.id === state.roundId) || project.progress.at(-1);
if (!round) return { columns: ["Name"], rows: [], errors: ["기성 회차가 없습니다."] };
const result =
round.locked && round.result ? round.result : EstProgress.calculate(project, round.id);
if (id === "progress-costs")
return {
columns: ["Gubun", "Name", "ContractCost", "JunCost", "GumCost", "SaCost", "TotalCost"],
rows: result.costs || [],
errors: result.errors,
detail: `${round.name || "기성"} (${round.locked ? "확정" : "작성 중"})`,
};
return {
columns: [
"Code",
@@ -41,8 +48,20 @@ const EstForms = (() => {
detail: `${round.name || "기성"} (${round.locked ? "확정" : "작성 중"})`,
};
}
if (id === "escalation-summary") {
if (["escalation-summary", "escalation-costs"].includes(id)) {
const result = EstEscalation.calculate(project);
if (id === "escalation-costs")
return {
columns: ["Gubun", "Name", "ContractCost", "adjustedCost", "excludedCost"],
rows: result.wonga.map((row, index) => ({
...row,
ContractCost: result.contractWonga[index]?.Cost,
adjustedCost: row.Cost,
excludedCost: result.excludedWonga[index]?.Cost,
})),
errors: result.errors,
detail: `도급액 ${result.contractTotal} · 조정액 ${result.adjustment} · 조정률 ${result.rate}%`,
};
return {
columns: [
"Code",
@@ -256,6 +275,13 @@ const EstForms = (() => {
ESC: "산출경비 증감",
directCost: "순공사비",
contractCost: "도급액",
ContractCost: "도급금액",
JunCost: "전회 금액",
GumCost: "금회 금액",
SaCost: "사정 금액",
TotalCost: "누계 금액",
adjustedCost: "조정 금액",
excludedCost: "제외 금액",
TargetCode: "연결 내역",
TU: "단가",
TC: "금액",