Exceptions for changed punch time in Timesheet

Use this forum to discuss desired new features for TimeTrex
Locked
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Exceptions for changed punch time in Timesheet

Post by quepasa »

I would like to have the timesheet show me exception codes for punches that were entered manually in the timesheet, or have been changed (like if an employee forgot to punch in and the supervisor added the punch in the timesheet or adjusted their time.)

I've been looking through the punch table trying to figure out an easy way to determine which punches were either created through the timesheet or adjusted after the fact. It looks like a good way is to compare "created_date" against "time_stamp" (converting "time_stamp" to a unix timestamp value.) If the absolute value (ABS function in MySQL) of the difference is greater than 300 (5 minutes), then the punch was either added manually, or changed.

Code: Select all

ABS(`created_date` - UNIX_TIMESTAMP(`time_stamp`)) > 300
That 5 minute threshold is good for me, but other people might want to be able to set their own.

Thanks,
-Ben
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

In v2.1.0-rc2 it will display the created/updated date of the punch, which will give you a good indication if the punch was modified, and by who.

The created_date vs. the time_stamp is not a good way, especially if you use hardware methods, as the punches could be delayed any length of time if the connection is down. created_date vs. updated_date is a better method to see if the punch was edited, and the station being blank is a good way to see if the punch was added manually.
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Post by quepasa »

Thanks for the info regarding using created_date vs. updated_date. I already knew that a null station meant a manually added punch, but I was hoping to be able to use the same method for determining both changed and added punches, and thought created_date vs time_stamp would do it.

Looking forward to v2.1, it looks like it will have just about every feature we want!

-Ben
Locked