Attendance report starus edition

This commit is contained in:
mashfiq 2025-04-13 17:30:55 +06:00
parent 63253ff06d
commit 2a30841b13
3 changed files with 57 additions and 14 deletions

View File

@ -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";

View File

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

View File

@ -2628,6 +2628,7 @@ namespace HRM.Report
DataSet oDailyInOut = null;
DataSet oPreviousDayInOut = null;
DataRow oDR = null;
List<Shift> oShifts = new ShiftService().Get(EnumStatus.Active, 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;