Clocking in and out of a job exactly at Midnight wreaks havoc

Well we’ve all seen what you can do with code. Pop a timestamp in there and show 'em how it’s done.

:rofl:

@josecgomez Have you tried “legally” adjusting the start back by at least a minute+ ? I have to slide things around on start and end because my timekeeping system I export to requires a separate minute for each export and I have operators that can do 30+ in a minute and I really only care about the quantity when things are that tight.

We do three shifts 6 days a week and in 12 years I have not seen this oddity, but I also do not have commissions riding on it. :slight_smile:

Yes I can after the fact go adjust the time manually or via dmt

But at some of these jobs have 30 people working on the line it is tedious at best

We have recall the record change it and re approve it

And do it beofre cos wip runs which is scheduled overnight

1 Like

As I was drinking and programming anyway I did a test. This may vary in your environment, but I moved start back 15 minutes in end activity at midnight and got .03 hours. 15 minutes ish

image

Just to be sure mother Epicor was good with that I ran wip recon on that transaction.

The issue is that, for whatever reason, a long time ago Epicor decided to store ClockInDate and ClockInTime (as well as ClockOutDate/Time) in two separate fields instead of being sane a using a datetime column correctly, in addition to then creating copies of those two fields for “display” (which is completely missing the point of a datetime field to begin with). This in turn causes all the “weird maths” it does to keep old code happy…

I recently had to deal with the same issue, and the customer was ok with just disabling clocking in or out between 23:55 and 00:05 through a BPM exception. In this case the gap was 5 minutes on either side because some scheduled task is running every 3 minutes to automatically close labor entries. That solved that, although not the pretty way.

Wait did you change it after the fact in Time and Expens? Or did you do it in end activity?

If in end activity how did you do it?

Framework limitations of the 90s

Not @josecgomez I clean up after that Tasmanian devil all the time. His code be like

var soemthing= "Hello World";
if(string.IsNullOrEmpty(soemthing) )
     throw new Exception("You need txt you donkey!");

if(soemthing =="test") {
   var mYBool = true;
}
2 Likes

After going back and looking, I said a lie… I didn’t do it through a BPM. They only used the HandHeld screen, so I “fixed it” by preventing clockins from BeforeAdapterMethod on Update in the customization. Probably not that useful in your case…

Pretty wild Jose, I am glad (but also not happy you have to deal with this) that you were faced with this problem before me… :sweat_smile: Now I can learn from you. Thank you for taking the time to document it for us.

Surprised I haven’t seen it yet.

Jose, excuse my french… but don’t you posess the SDK so you could make changes to the ‘internal’ code of Epicor ? Or this is not allowed? :roll_eyes:

Also, I am sure you did mention this to support… what Epicor said about this ‘feature’ ? Are they considering being a bug? or told you it works as designed (as you showed us with your code snippet) or did they told you to add to the ideas portal? :laughing:

Pierre

Lol, you should do comedy. :wink:

I thought that was comedy.

Well I did, and the response from support told me they didn’t even understand the problem. So I’m going to try and explain it again this time with playdough and see where we land.
Support:

That might be too advanced. Start small, Try crayons.

The SDK Allows you to create your own BOs and modify existing front end screens. But you aren’t given the Epicor server side code (any longer)

1 Like

daughter crayon GIF

@josecgomez I did it in End Activity and it got me labor hours. I did not think to try resetting clockintime or dspclockintime. But if I look at the data clockinminute and clockoutminute are the same so it did revert at some point.

ttLaborDtlRow.ClockInMInute = ttLaborDtlRow.ClockInMInute - 15;

I don’t work with MES/Labor so I must be doing something wrong, I figured this would be quick to duplicate but I can’t. Can you share what the steps would be using the Classic MES screen?

clockOutTimeMES is not called when Clocking Out, but it is called when Ending an Activity, also I can’t find that second piece of code.