feat(est): print annual item allocations

This commit is contained in:
2026-11-07 10:42:16 +09:00
parent 7422a70ac4
commit 9787b4b1f6
4 changed files with 20 additions and 4 deletions
+13 -1
View File
@@ -6,8 +6,19 @@ const EstForms = (() => {
columns: ["Gubun", "Name", "originalCost", "changedCost", "difference"],
rows: EstBusiness.costChanges(project),
};
if (id === "annual-summary") {
if (["annual-summary", "annual-items"].includes(id)) {
const output = EstBusiness.annual(project, false);
if (id === "annual-items")
return {
columns: ["stage", "Code", "Name", "Size", "Unite", "GN", "NC", "GC", "JC", "SC", "TC"],
rows: output.results.flatMap((item) =>
item.project.tables.EstMainDat.filter((row) => row.Code || row.Name).map((row) => ({
...row,
stage: item.name,
})),
),
errors: output.errors,
};
return {
columns: ["Name", "formula", "directCost", "contractCost"],
rows: project.annual.map((year, index) => ({
@@ -289,6 +300,7 @@ const EstForms = (() => {
excludedCost: "제외 금액",
originalCost: "당초 금액",
changedCost: "변경 금액",
stage: "차수",
TargetCode: "연결 내역",
TU: "단가",
TC: "금액",