fix(timesheet): remove lines that were interfering with weekly overtime calculations.
This commit is contained in:
parent
9079cfceed
commit
7d492a2817
|
|
@ -92,6 +92,7 @@ export const mapOneTimesheet = async (timesheet: Prisma.TimesheetsGetPayload<{
|
|||
daily_hours[subgroup] += hours;
|
||||
weekly_hours[subgroup] += hours;
|
||||
}
|
||||
console.log('date: ', shift.date, ', hours worked: ', hours, ', type: ', subgroup, ', current weekly overtime: ', weekly_hours['overtime']);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -126,9 +127,6 @@ export const mapOneTimesheet = async (timesheet: Prisma.TimesheetsGetPayload<{
|
|||
};
|
||||
});
|
||||
|
||||
weekly_hours['overtime'] = Math.max(weekly_hours['regular'] - 40, 0);
|
||||
weekly_hours['regular'] = Math.min(weekly_hours['regular'], 40);
|
||||
|
||||
return {
|
||||
timesheet_id: timesheet.id,
|
||||
is_approved: timesheet.is_approved ?? false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user