I imported your baq and bpm to clock employees out and only changed better log to ice.Diagnostics.Log.Write Entry,changed the name of baq, and commented out UDfield.
I am getting this error and do not know what to correct. I am on 2022.17.
System.Drawing.Bitmap CS7036 There is no argument given that corresponds to the required formal parameter ‘morePages’ of ‘LaborSvcContract.GetRows(string, string, string, string, string, string, string, string, string, string, string, string, string, int, int, out bool)’
Here is the bpm that you published
double timeInLimitHrs = 14.00;
try
{
using(var labor = Ice.Assemblies.ServiceRenderer.GetService<LaborSvcContract>(Db, true))
{
// Get active labor heads
bool outBool = false;
var clockedInRecords = labor.GetRows("LaborHed.ClockOutTime = 0 AND ActiveTrans = true", "", "", "", "", "", "", "", "", "", "", "", 0, 0, out outBool);
// Review each labor head record
foreach (var hed in clockedInRecords.LaborHed)
{
try
{
var clockInTime = ((DateTime)hed.ClockInDate).AddHours((double)hed.ClockInTime);
var clockInLength = DateTime.Now - clockInTime;
// Clock out anyone logged in over X hours.
if (clockInLength.TotalHours > timeInLimitHrs)
{
Ice.Diagnostics.Log.WriteEntry($"EmpID: {hed.EmployeeNum}, Date: {hed.PayrollDate:d}, Hours: {clockInLength.TotalHours:N2}", "ClockOutEmp");
// Retrieve labor details
var laborData = labor.GetByID(hed.LaborHedSeq);
// End Activities
foreach (var dtl in laborData.LaborDtl)
{
try
{
if (dtl.ActiveTrans)
{
dtl.RowMod = "U";
labor.EndActivity(ref laborData);
labor.Update(ref laborData);
Ice.Diagnostics.Log.WriteEntry($"Type = {dtl.LaborType}, Resource = {dtl.ResourceDesc}, JobNum = {dtl.JobNum}, LaborHedSeq = {dtl.LaborHedSeq}, LaborDtlSeq = {dtl.LaborDtlSeq}", "ClockOutEmp");
}
}
catch (Exception ex)
{
Ice.Diagnostics.Log.WriteEntry($"ERROR ENDING ACTIVITY: JobNum = {dtl.JobNum}, LaborHedSeq = {dtl.LaborHedSeq}, LaborDtlSeq = {dtl.LaborDtlSeq}--Error: {ex.Message}", "ClockOutEmp");
}
}
// Tag record as 'Missed Punch' this is used for reporting on when Emps forget to clock out.
/*hed.RowMod = "U";
hed["MissedPunch_c"] = true;
labor.Update(ref laborData);*/
// Clock out employee
using(var emp = Ice.Assemblies.ServiceRenderer.GetService<EmpBasicSvcContract>(Db, true))
{
var EmployeeNum = hed.EmployeeNum;
Ice.Diagnostics.Log.WriteEntry($"Clocking out EmpID: {EmployeeNum}", "ClockOutEmp");
emp.ClockOut(ref EmployeeNum);
}
}
}
catch (Exception ex)
{
Ice.Diagnostics.Log.WriteEntry($"ERROR ENDING HEAD: EmpID = {hed.EmployeeNum}, LaborHedSeq = {hed.LaborHedSeq}--Error: {ex.Message}", "ClockOutEmp");
}
}
}
}
catch(Exception ex)
{
Ice.Diagnostics.Log.WriteEntry(ex.Message, "ClockOutEmp");
}