From 92dffb5abb2f8a85f4961f2527e315f893aca76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?walkdoggo=2Eyeh=5F=E8=91=89=E5=82=B3=E8=80=80?= Date: Wed, 4 Nov 2026 07:51:07 +0000 Subject: [PATCH] =?UTF-8?q?feat:=202028=20=E8=B5=B7=E5=9C=A8=E8=81=B7?= =?UTF-8?q?=E6=9C=88=E4=BB=BD=E9=A0=90=E8=A8=AD=E5=85=A8=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ --- cost-model.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cost-model.js b/cost-model.js index e7a9c9d..bd32b4a 100644 --- a/cost-model.js +++ b/cost-model.js @@ -85,13 +85,14 @@ export function boundMonths(months, hireDate, leaveDate, year) { return out; } -export function toCostPerson(person, salary, override = {}, { year } = {}) { +export function toCostPerson(person, salary, override = {}, { year, fullYearDefault = false } = {}) { const saved = normalizeOverride(override); const months = boundMonths({ h1Start: has(saved, 'h1Start') ? saved.h1Start : 1, h1End: has(saved, 'h1End') ? saved.h1End : 6, - h2Start: has(saved, 'h2Start') ? saved.h2Start : '', - h2End: has(saved, 'h2End') ? saved.h2End : '', + // 2028 起預設全年(再依 HR 到職/離職限縮);2027 維持原本的預設(H2 留空)。 + h2Start: has(saved, 'h2Start') ? saved.h2Start : (fullYearDefault ? 7 : ''), + h2End: has(saved, 'h2End') ? saved.h2End : (fullYearDefault ? 12 : ''), }, person.hireDate, person.leaveDate, year); const place = placement(person, saved); const salaryType = salary?.salaryType === 'hourly' ? 'hourly' : 'monthly';