diff --git a/HRM.BO/Fund/Basic/GlobalFunctions.cs b/HRM.BO/Fund/Basic/GlobalFunctions.cs index de1ad4b..1485203 100644 --- a/HRM.BO/Fund/Basic/GlobalFunctions.cs +++ b/HRM.BO/Fund/Basic/GlobalFunctions.cs @@ -312,18 +312,10 @@ namespace HRM.BO type = "A"; break; - case EnumAttendanceType.Delay: - type = "L"; - break; - case EnumAttendanceType.Holiday: type = "H"; break; - case EnumAttendanceType.Late: - type = "L"; - break; - case EnumAttendanceType.Leave: type = "Lv"; break; @@ -332,6 +324,17 @@ namespace HRM.BO type = "P"; break; + case EnumAttendanceType.HalfDay: + type = "HD"; + break; + + case EnumAttendanceType.Delay: + type = "L"; + break; + + case EnumAttendanceType.Late: + type = "L"; + break; case EnumAttendanceType.OutSideDuty: type = "OD"; diff --git a/HRM.BO/HRBasic/Enums.cs b/HRM.BO/HRBasic/Enums.cs index 90f48c2..641b248 100644 --- a/HRM.BO/HRBasic/Enums.cs +++ b/HRM.BO/HRBasic/Enums.cs @@ -2425,13 +2425,24 @@ namespace HRM.BO //Delay = 3, //Leave = 4, //Holiday = 5, - WeeklyOff = 6, + //WeeklyOff = 6, //TourDuty = 7, //OfficialDuty = 8, - Compensation = 9, - ManualEntry = 10, + //Compensation = 9, + //ManualEntry = 10, //Late = 11 None = 0, + //Present = 1, + //Absent = 2, + //Delay = 3, + //Late = 11, + //Early = 12, + //Leave = 4, + //Holiday = 5, + //OutSideDuty = 7, + //WeeklyHoliday = 8, + //HalfDay = 18, + //LOA = 22 Present = 1, Absent = 2, Delay = 3, @@ -2439,10 +2450,9 @@ namespace HRM.BO Early = 12, Leave = 4, Holiday = 5, + HalfDay = 6, OutSideDuty = 7, - WeeklyHoliday = 8, - HalfDay = 18, - LOA = 22 + WeeklyHoliday = 8 } diff --git a/HRM.Report/Class/rptEcho.cs b/HRM.Report/Class/rptEcho.cs index 283ffee..2840451 100644 --- a/HRM.Report/Class/rptEcho.cs +++ b/HRM.Report/Class/rptEcho.cs @@ -2628,6 +2628,7 @@ namespace HRM.Report DataSet oDailyInOut = null; DataSet oPreviousDayInOut = null; DataRow oDR = null; + List oShifts = new ShiftService().Get(EnumStatus.Regardless, payrollTypeID); oDailyInOut = new EchoTexExceptionReportService().GetDailyInOut(attnDate, sEmpID); oPreviousDayInOut = new EchoTexExceptionReportService().GetDailyInOut(PreviousAttnDate, sEmpID); position = 1; @@ -2666,6 +2667,35 @@ namespace HRM.Report oDR["Shift"] = Dr["Shift"].ToString(); oDR["CardNo"] = Dr["CardNo"].ToString(); + Shift oSft = oShifts.Find(x => x.ShortName == Dr["Shift"].ToString()); + DateTime? dtIn = null; + DateTime? dtOut = null; + + if (Dr["InTime"] is DBNull) + { + dtIn = null; + } + else + { + dtIn = Convert.ToDateTime(Dr["InTime"].ToString()); + } + if (Dr["OutTime"] is DBNull) + { + dtOut = null; + } + else + { + dtOut = Convert.ToDateTime(Dr["OutTime"].ToString()); + } + + if (oSft != null && dtIn != null && dtOut != null) + { + if (Convert.ToDateTime(dtIn).TimeOfDay > oSft.InTime.TimeOfDay && + Convert.ToDateTime(dtOut).TimeOfDay < oSft.OutTime.TimeOfDay) + { + oDR["Status"] = "LE"; + } + } dTable.Rows.Add(oDR); } position = 6; diff --git a/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts b/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts index b11d5e8..0844a45 100644 --- a/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts +++ b/HRM.UI/ClientApp/src/app/reports/report-viewer/report-viewer.component.ts @@ -733,7 +733,7 @@ export class ReportViewerComponent implements OnInit { } else if (this.reportType === '714') { // debugger; - this.SearchFrom = EnumSearchFrom.Attendance; + // this.SearchFrom = EnumSearchFrom.Attendance; this.multiselect = true; this.hiddenFromDate = true; this.hiddenToDate = false; @@ -746,7 +746,7 @@ export class ReportViewerComponent implements OnInit { this.apiService.selectedMenuName = 'Daily Absent'; } else if (this.reportType === '716') { // debugger; - this.SearchFrom = EnumSearchFrom.Attendance; + // this.SearchFrom = EnumSearchFrom.Attendance; this.multiselect = true; this.hiddenFromDate = true; this.hiddenToDate = false;