Update cost-pdf.html: Refined POOL A logic and UI improvements.
This commit is contained in:
@@ -149,7 +149,7 @@
|
||||
}
|
||||
} catch(e) { console.warn("Firebase not available."); }
|
||||
|
||||
const POOL_A_PROJECTS = ['총무 [26-관리-03]', '부서 공통 [26-관리-06]', '공통'];
|
||||
const POOL_A_PROJECTS = ['총무 [26-관리-03]', '부서 공통 [26-관리-06]'];
|
||||
const POOL_B_PROJECTS = ['관리', '생산', '인사 [26-관리-02]'];
|
||||
const TEAM_RATIOS = { '일반경비': { '철근팀': 0.45, '제작팀': 0.30, '공무팀': 0.25 } };
|
||||
const NON_MANAGED_FORMS = ['가족사지원', '공통', '기타', '시설관리', '연구개발', '현장자재', '현장지원', '공통(거더)', '공통(데크,가로보)', '품질'];
|
||||
@@ -558,8 +558,6 @@
|
||||
fEx.forEach(e => {
|
||||
if (isB(e.projectName)) poolBVal += e.amount;
|
||||
else if (isA(e.projectName)) poolAVal += e.amount;
|
||||
else if (e.team === '관리팀' && !mgmtPoolAAccounts.some(acc => e.account.includes(acc))) poolBVal += e.amount;
|
||||
else if (e.team === '관리팀') poolAVal += e.amount;
|
||||
else {
|
||||
if (!projectMap[e.projectName]) projectMap[e.projectName] = { name: e.projectName, direct: 0, hours: 0, byAccount: {}, byTeam: {}, byForm: {} };
|
||||
projectMap[e.projectName].direct += e.amount;
|
||||
@@ -630,12 +628,7 @@
|
||||
formMap[fName].breakdown[p.name] = (formMap[fName].breakdown[p.name] || 0) + val;
|
||||
formMap[fName].allocTrace.push({
|
||||
projectName: p.name,
|
||||
directShare: val,
|
||||
ratio,
|
||||
projectHours: p.hours,
|
||||
shareHours,
|
||||
allocA: shareAllocA,
|
||||
allocB: shareAllocB
|
||||
directShare: v
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1048,6 +1041,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-2xl border border-slate-200 shadow-sm p-5 space-y-4">
|
||||
<h3 className="text-sm font-black text-slate-800">POOL 기준 안내</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-xs">
|
||||
<div className="bg-blue-50 border border-blue-100 rounded-xl p-4 space-y-2">
|
||||
<div className="font-black text-blue-800">운영비 (POOL A)</div>
|
||||
<div className="text-slate-700">운영/공통 성격 비용을 수익 프로젝트 공수 비율로 배분하는 풀입니다.</div>
|
||||
<div className="text-slate-500">기본 프로젝트: {POOL_A_PROJECTS.join(', ') || '-'}</div>
|
||||
</div>
|
||||
<div className="bg-orange-50 border border-orange-100 rounded-xl p-4 space-y-2">
|
||||
<div className="font-black text-orange-800">관리비 (POOL B)</div>
|
||||
<div className="text-slate-700">관리/간접 성격 비용을 수익 프로젝트 공수 비율로 배분하는 풀입니다.</div>
|
||||
<div className="text-slate-500">기본 프로젝트: {POOL_B_PROJECTS.join(', ') || '-'}</div>
|
||||
</div>
|
||||
<div className="bg-violet-50 border border-violet-100 rounded-xl p-4 space-y-2">
|
||||
<div className="font-black text-violet-800">형식배분 (C)</div>
|
||||
<div className="text-slate-700">원가관리 비대상 형식 원가를 관리대상 형식으로 규칙에 따라 재배분합니다.</div>
|
||||
<div className="text-slate-500">적용 범위: 형식별 탭 전용 (교량별/팀별 미적용)</div>
|
||||
<div className="text-slate-500">비대상 형식은 형식별 리스트에서 숨김 처리됩니다.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden overflow-x-auto custom-scrollbar">
|
||||
<table className="w-full text-left min-w-[1000px] dashboard-table">
|
||||
<thead>
|
||||
@@ -1056,8 +1071,8 @@
|
||||
<th className="text-right">직접비</th>
|
||||
<th className="text-right">배분(A)</th>
|
||||
<th className="text-right">배분(B)</th>
|
||||
{viewMode === 'type' && <th className="text-right">배분(C)</th>}
|
||||
{viewMode === 'type' && <th>C 배분내역</th>}
|
||||
{viewMode === 'type' && <th className="text-right">배분(C) <span className="text-[10px] text-violet-600">(형식별 전용)</span></th>}
|
||||
{viewMode === 'type' && <th>C 배분내역 <span className="text-[10px] text-violet-600">(형식별 전용)</span></th>}
|
||||
<th className="text-right">최종 원가</th>
|
||||
{viewMode === 'type' && <th className="text-center">생산량 / 단위원가</th>}
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user