summaryrefslogtreecommitdiff
path: root/src/Result.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Result.jsx')
-rw-r--r--src/Result.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Result.jsx b/src/Result.jsx
index e79ba7f..e361fc7 100644
--- a/src/Result.jsx
+++ b/src/Result.jsx
@@ -83,7 +83,8 @@ function calculatePerDay(entry, baseSalary) {
]
}
- const segmentedDuration = segmentTime(overtimeDuration, [1]);
+ const segmentPattern = weekendDay(entry.date) ? [8, 1, 15] : [1];
+ const segmentedDuration = segmentTime(overtimeDuration, segmentPattern);
const usedMap = weekendDay(entry.date) ? multiplierMap.holidays : multiplierMap.workDays;
for (let i = 0; i < segmentedDuration.length; i++) {
multiplier += segmentedDuration[i] * usedMap[i];