Labor / Production Entry Corrections + Office Data Collection

We are in the process of making the leap from 6.1 to Kinetic 2023.

One of the areas we are struggling with is the process of going in to a previous day’s production and pulling up transactions or adding an indirect etc to a previous day’s employe’s activities. We are relying on MES. Does anyone have any suggestions?

Related to that is clocking out an employee when they forgot to do so at the end of the shift. It was very easy to do this in Vantage 6.1 Data Collection office. We can’t seem to figure this out in Kinetic.

Previous Days Labor use Time and Expense Entry.
Clocking out a Shop Employee from the Office side we just load a MES session and clock them out.

2 Likes

I run a scheduled function that does this, I do not believe I have shared it, I will clean it up and do so.

In the meantime, I believe @Dragos shared something similar here:
https://www.epiusers.help/t/lets-share-useful-functions-sharing-is-caring/100371/22

1 Like

Wow! And Welcome!

thanks for the idea

Our challenge is some of these people need a Password to use MES so we would have to know their password

I also made a dashboard.

I’m pretty sure there is somewhere in the system you can do this natively though, just can’t remember.

There are processes in Conversion Workbench to End Activities and Clock Out employees.

They’ve actually promoted these to individual menus in the latest Kinetic, so you no longer need access to Conversion Workbench.
image

You can see the menu structure, so who ever is doing this will need access to System Management on down… or you could create new menus to put them in a different (more accessible) spot.

1 Like

Kevin, do y’all run 3 shifts?

2

Edit:
If you’re wondering what my rules are, here it is.
I run it at 8:15 AM & 8:15PM.
If any user has been logged in for more than 2 hours at that time, they get closed out.

I knew I seen it somewhere! Awesome.

@Mark_Wonsil is going to come in here and yell “You should never need to know a users password!” which is true. For what reason would you need to know it? I think we can bring clarity to your entry/adj process and remove that need.

1 Like

When you all jump in before I can answer, I feel…I feel…so proud. :face_holding_back_tears:

There are two problems here:

Login/Logout
Currently, there is no cost to do this incorrectly. We push the responsibility to supervisors or automate it away. Maybe if the employee were docked 15 minutes to have someone else do their work and fix each instance would help? :person_shrugging:

Security at Shared Workstations
This is a tough one, especially for those trying to implement Zero Trust properties into their systems. There may be hope in a profile system of some kind (Operating System or browser) but I haven’t seen anything that worked well yet. :face_with_raised_eyebrow:

1 Like

If you have a shared workstation that many employees are using with a generic “Shop” type use account, those are passwords everyone knows. However, you may have a subset of users who also use MES at that workstation who have some elevated privileges (such as access to Job Entry, etc). Those employees have their own User ID set up in security with rights, and that user ID is on the Employee Record for their Employee Number. There’s no way to clock into MES as that employee and clock them out without getting past the login that’s tied to their user account.

So, for the average shop employee who isn’t tied to a userID, you can log into MES as the SHOP employee, clock in as the employee’s who didn’t clock out and simply clock them out. If it’s an elevated shop employee, the only thing you can do is reset their password, then log in as them and clock them out. So, whether you “know their password” or “reset their password”, neither is a good solution.

Kevin

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");
}

I’m sure since I wrote that they have changed the method signature you’ll have to look at it. I think the param they might have added is processId