From 7b04c7a3e520333d388458a7fa18032f92bab9f3 Mon Sep 17 00:00:00 2001 From: chapal Date: Tue, 6 May 2025 11:14:15 +0600 Subject: [PATCH] ok --- .../Service/Attendance/AttendanceProcess.cs | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/HRM.DA/Service/Attendance/AttendanceProcess.cs b/HRM.DA/Service/Attendance/AttendanceProcess.cs index af4b782..59dc2cd 100644 --- a/HRM.DA/Service/Attendance/AttendanceProcess.cs +++ b/HRM.DA/Service/Attendance/AttendanceProcess.cs @@ -2454,23 +2454,26 @@ namespace HRM.DA DataSet EmpOTHours = new ShiftTermService().GetEmpOT(oPayrollType.NextPayProcessDate, trm.ID); foreach (DataRow Dr in EmpOTHours.Tables[0].Rows) { - Employee tempEmployee = employees.Where(emp => emp.ID.ToString() == Dr["EmployeeID"].ToString()).FirstOrDefault(); - if (tempEmployee == null || tempEmployee.IsEligibleOT == false) continue; - - if (tempEmployee.GradeID == null) - { - ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "Grade not assinged")); - continue; + //if (Convert.ToDouble(Dr["TotalOT"])>0) + //{ + Employee tempEmployee = employees.Where(emp => emp.ID.ToString() == Dr["EmployeeID"].ToString()).FirstOrDefault(); + if (tempEmployee == null || tempEmployee.IsEligibleOT == false) continue; - } - if (Dr["TotalOT"] == DBNull.Value) - { - // ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "value can't be null ")); - continue; - } + if (tempEmployee.GradeID == null) + { + ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "Grade not assinged")); + continue; - EmpOverTimes = MakeEmployeeOvertimeObj(ref EmpOverTimes, ref ErrorList, tempEmployee, termParameters, - oPayrollType, trm.ID, Convert.ToDouble(Dr["TotalOT"]), userid); + } + if (Dr["TotalOT"] == DBNull.Value) + { + // ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "value can't be null ")); + continue; + } + + EmpOverTimes = MakeEmployeeOvertimeObj(ref EmpOverTimes, ref ErrorList, tempEmployee, termParameters, + oPayrollType, trm.ID, Convert.ToDouble(Dr["TotalOT"]), userid); + //} } } }