Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
This commit is contained in:
+4
-3
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user