Allocating directionless clocks to work summaries
If the FORCE_CLOCK_ON_DAY registry parameter is set to TRUE, then this occurs:
- The eudf_value (found by selecting
- If it is not null, then it is assigned to the CLOCKING_DAY_START variable (stored in HH:MM, hours and minutes).
- Otherwise, the CLOCKING_DAY_START registry parameter is checked. If it is not null, then it is assigned to a variable of the same name, CLOCKING_DAY_START.
, selecting the employee, and navigating to the Employee Data section)
is checked for CLOCKING_DAY_START, which is an Employee Data Definition: - If the CLOCKING_DAY_START variable
has been set by the previous step, then:
- If CLOCKING_DAY_START is after 12:00PM and the clock is after CLOCKING_DAY_START, then the clock is assigned to the work summary record of the next day.
- If the CLOCKING_DAY_START is before 12:00PM and the clock is before CLOCKING_DAY_START, then the clock is assigned to the work summary record of the previous day.
- If the CLOCKING_DAY_START variable has not been set, then the clock is assigned to the work summary record for the truncated date of the clock (the clk_time ignoring hours, minutes, and seconds).
If the FORCE_CLOCK_ON_DAY regsitry parameter is set to FALSE, then this occurs:
- The clk_time is added to the DIRLESS_CLOCK_OFFSET registry parameter (stored in minutes; defaults to 120 minutes or 2 hours).
- This value is subtracted from today,
yesterday, and tomorrow's scheduled start time (empskd_act_start_time from the
employee_schedule database table) to get a number of minutes between the two values.
If the day is scheduled OFF, then the same shift is assumed as the last scheduled day. If the employee has not been scheduled for more than the SCHEDULE_MAX_LOOK_BACK_DAYS registry parameter, which defaults to 14 days, then it is assumed that the employee starts work at 7:00AM of the day that the clock was swiped. The differences for today, yesterday, and tomorrow are considered. The day with the minimum positive difference is then selected, and the clock is associated with that day.
Example:
The clock is associated for whichever day's scheduled start time results in a difference between 0 and 1440 (one entire day). When FORCE_CLOCK_ON_DAY is set to FALSE, these calculations are made:
(Clock Punch + Offset) - Start Time = X .
This will determine which day the clock belongs to. You do the calculations for today, yesterday, and tomorrow. If X is between 0 and 1440 minutes, that will be the day to which the punch will be assigned.