feat(est): print progress and price adjustments

This commit is contained in:
2026-11-07 08:48:25 +09:00
parent b3bd093d42
commit cffeb84ce4
3 changed files with 99 additions and 5 deletions
+63 -1
View File
@@ -1,6 +1,54 @@
const EstForms = (() => {
const common = ["Code", "Name", "Size", "Unite"];
function data(id, project) {
function data(id, project, state = {}) {
if (id === "progress-summary") {
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);
return {
columns: [
"Code",
"Name",
"Unite",
"GN",
"TC",
"JunGN",
"JunTC",
"GumGN",
"GumTC",
"SaGN",
"SaTC",
"TotalGN",
"TotalTC",
],
rows: result.rows,
errors: result.errors,
detail: `${round.name || "기성"} (${round.locked ? "확정" : "작성 중"})`,
};
}
if (id === "escalation-summary") {
const result = EstEscalation.calculate(project);
return {
columns: [
"Code",
"Name",
"Unite",
"GN",
"EscExcluded",
"EscApplied",
"TC",
"ENC",
"EGC",
"EJC",
"ESC",
],
rows: result.rows,
errors: result.errors,
detail: `도급액 ${result.contractTotal} · 조정액 ${result.adjustment} · 조정률 ${result.rate}%`,
};
}
if (id === 171) {
const output = EstReview.calculate(project);
const rows = output.baseline.tables.EstMainDat.map((row, index) => ({
@@ -179,6 +227,20 @@ const EstForms = (() => {
SheetName: "산출서",
Error: "계산 오류",
Reason: "심사 사유",
JunGN: "전회 수량",
JunTC: "전회 금액",
GumGN: "금회 수량",
GumTC: "금회 금액",
SaGN: "사정 수량",
SaTC: "사정 금액",
TotalGN: "누계 수량",
TotalTC: "누계 금액",
EscExcluded: "제외 수량",
EscApplied: "적용 수량",
ENC: "노무비 증감",
EGC: "재료비 증감",
EJC: "경비 증감",
ESC: "산출경비 증감",
TargetCode: "연결 내역",
TU: "단가",
TC: "금액",