fix(timesheet): remove lines that were interfering with weekly overtime calculations.

This commit is contained in:
Nic D 2026-01-15 09:37:52 -05:00
parent 9079cfceed
commit 7d492a2817

View File

@ -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,