Skip to content

Commit cb20f85

Browse files
authored
Merge pull request #166 from educorvi/develop
fix: vacation day calculation
2 parents 7dcdb30 + 818e4a2 commit cb20f85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/vacationDayCalculation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ async function getTotalVacationDays(user: User) {
2222

2323
const contractDuration = (nextContractStartYear - contract.startYear) * 12 + nextContractStartMonth - contract.startMonth;
2424

25-
vacationDays += Math.ceil(contract.vacationDays * contractDuration / 12);
25+
vacationDays += contract.vacationDays * contractDuration / 12
2626
}
2727

28+
vacationDays = Math.ceil(vacationDays);
2829
return vacationDays;
2930

3031
}

0 commit comments

Comments
 (0)