From 7d492a2817f3dc42a7b275ad053db7a03df056c1 Mon Sep 17 00:00:00 2001 From: Nic D Date: Thu, 15 Jan 2026 09:37:52 -0500 Subject: [PATCH] fix(timesheet): remove lines that were interfering with weekly overtime calculations. --- src/time-and-attendance/timesheets/timesheet.mapper.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/time-and-attendance/timesheets/timesheet.mapper.ts b/src/time-and-attendance/timesheets/timesheet.mapper.ts index 4a04a8b..52940c5 100644 --- a/src/time-and-attendance/timesheets/timesheet.mapper.ts +++ b/src/time-and-attendance/timesheets/timesheet.mapper.ts @@ -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,