Best way to implement validation for labor/burden hours

Hello, I need to create a customization on the Time Entry screen to enforce a business rule we use. The rule is that the burden hours should equal the labor hours. My question is what do you all think would be the best way to implement this? I can think of a few different ways, possibly all acceptable:

Data directive
Method directive
Form event (field leave, save button ..)

I am leaning towards either a method or data directive since those would not depend on the UI and would centralize the logic.

Any suggestions? Thanks

Can you check the box that Labor hours = Burden hours on the resource? I believe the system will enforce it for you if you do this.

1 Like

We do this in a Pre-Processing BPM on Labor.Update.

In manufacturing an operator could be split running two machines. so we let the system handle those cases based on resource/operations settings. Those entries are logged via MES.

But in the case of our Engineers, who log time via Time Entry, we always want Labor = Burden.

We have custom code that checks the employee record. If the employee is a part of our engineering JCDept, it sets LaborDtl.BurdenHrs = LaborDtl.LaborHrs.

1 Like

Here is our code, if it helps.

If you want it across the board, you can just get rid of the employeeRecord check:

try
{

  foreach (var laborDtl in (from x in ds.LaborDtl select x))
  {
      var employeeRecord = (from x in Db.EmpBasic
                            where x.Company == Session.CompanyID &&
                                  x.EmpID == laborDtl.EmployeeNum
                            select x).FirstOrDefault();
                            
      if (employeeRecord != null && employeeRecord.JCDept == "0720")
      {
  
        if (laborDtl.LaborTypePseudo == "I")
        {
          laborDtl.BurdenHrs = 0;    
        }
        else
        {
          laborDtl.BurdenHrs = laborDtl.LaborHrs;            
        }
      }
  }
}
catch (Exception e)
{
  this.PublishInfoMessage("Error setting burden hours in Method Directive:  Labor.Update  " + e.Message, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "Labor", "Update");
    

}
3 Likes

OK I wasn’t even aware of that setting. I picked a user that had that setting true, then I tried changing the labor hours and it seemed to work (the burden hours updated to the labor hours). I need to check into this a little more. We already have that option set on resource groups (in v10.2) so I don’t know why we would need that customization now. Let me investigate a little…

1 Like

@dcamlin - couldn’t you just use the ‘burden = labor’ setting on your engineers to enforce this?

We don’t have our individual employees set up as resources.

1 Like

OK so after some discussion with my coworkers and testing, we DO need this somewhere. The burden hours does not update to the labor hours when you recall and update a time record. So my original question as to where this is best handled is probably a BPM as @dcamlin suggested (and thank you for the code!) I will try that route and may be back for more questions.