In this commit fixed the Bug #74 where when the regularization request sent it takes the date of request as checkout date #19

Merged
vikas.nale merged 1 commits from Ashutosh_Bug_#74_Attendance_Regularization_Date into Feature_Task_management 2025-04-16 05:23:49 +00:00
Showing only changes of commit a9f4610063 - Show all commits

View File

@ -275,7 +275,7 @@ namespace MarcoBMS.Services.Controllers
if (recordAttendanceDot.MarkTime == null) return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Mark Time", "Invalid Mark Time",400));
DateTime finalDateTime = GetDateFromTimeStamp(recordAttendanceDot, recordAttendanceDot.MarkTime);
DateTime finalDateTime = GetDateFromTimeStamp(recordAttendanceDot.Date, recordAttendanceDot.MarkTime);
if (recordAttendanceDot.Comment == null) return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Comment", "Invalid Comment", 400));
if (attendance != null)
@ -298,7 +298,8 @@ namespace MarcoBMS.Services.Controllers
}
else if (recordAttendanceDot.Action == ATTENDANCE_MARK_TYPE.REQUEST_REGULARIZE)
{
DateTime date = attendance.AttendanceDate;
finalDateTime = GetDateFromTimeStamp(date.Date, recordAttendanceDot.MarkTime);
attendance.OutTime = finalDateTime;
attendance.Activity = ATTENDANCE_MARK_TYPE.REQUEST_REGULARIZE;
// do nothing
@ -399,9 +400,9 @@ namespace MarcoBMS.Services.Controllers
}
private static DateTime GetDateFromTimeStamp(RecordAttendanceDot recordAttendanceDot, string timeString)
private static DateTime GetDateFromTimeStamp(DateTime date, string timeString)
{
DateTime date = recordAttendanceDot.Date;
//DateTime date = recordAttendanceDot.Date;