feat(est): print progress and price adjustments
This commit is contained in:
@@ -20,7 +20,7 @@ const EstReport = (() => {
|
||||
const { state, esc } = EstApp;
|
||||
const settings = setting(),
|
||||
form = catalog.find((row) => String(row.Index) === settings.form),
|
||||
output = form ? EstForms.data(form.Index, state.project) : null;
|
||||
output = form ? EstForms.data(form.Index, state.project, state) : null;
|
||||
const number = (value) =>
|
||||
new Intl.NumberFormat("ko-KR", { maximumFractionDigits: 12 }).format(Number(value) || 0);
|
||||
const root = document.createElement("div");
|
||||
@@ -76,15 +76,18 @@ const EstReport = (() => {
|
||||
.forEach((node) => node.removeAttribute("contenteditable"));
|
||||
const title = form?.Name2 || EstApp.titles[state.view] || state.view;
|
||||
const detail =
|
||||
state.view === "quantity"
|
||||
output?.detail ||
|
||||
(state.view === "quantity"
|
||||
? state.project.quantitySheets?.find((sheet) => sheet.Code === state.quantitySheet)?.Name
|
||||
: state.view === "progress"
|
||||
? state.project.progress.find((round) => round.id === state.roundId)?.name
|
||||
: state.group
|
||||
? EstNative.groups(state.project.tables[state.view] || []).get(state.group)?.rows[0]
|
||||
?.Name
|
||||
: "";
|
||||
const totals = state.project.calculation;
|
||||
: "");
|
||||
const totals = ["progress-summary", "escalation-summary"].includes(form?.Index)
|
||||
? null
|
||||
: state.project.calculation;
|
||||
const errors = [...(totals?.errors || []), ...(output?.errors || [])];
|
||||
const source = `<!doctype html><html lang="ko"><head><meta charset="UTF-8"><title>${esc(state.project.name)} · ${esc(title)}</title>
|
||||
<style>@page{size:${settings.paper} ${settings.orientation};margin:${settings.margin}mm}*{box-sizing:border-box}body{font:${settings.font}pt "Malgun Gothic",sans-serif;color:#111;margin:0}
|
||||
@@ -127,6 +130,10 @@ const EstReport = (() => {
|
||||
...row,
|
||||
...original.get(row.Index),
|
||||
}));
|
||||
catalog.push(
|
||||
{ Index: "progress-summary", Name: "기성 내역서", Name2: "기성 내역서" },
|
||||
{ Index: "escalation-summary", Name: "물가변동 내역서", Name2: "물가변동 내역서" },
|
||||
);
|
||||
const table = EstApp.state.project.tables[EstApp.state.view];
|
||||
const s = setting(),
|
||||
{ esc } = EstApp;
|
||||
|
||||
Reference in New Issue
Block a user