Home      Ask a Question      My Stuff      Help   
  
Scripting - Scripting Shift Differentials to the Majority of a Shift
Sometimes the employer wants the employee's pay to be based on the majority of the shift they worked. For example:

Employee 1 works the Swing shift which is 2:00pm-10:00pm which he gets an additional $1.00 to work on top of his normal payrate. After that there is a Night shift from 10:00pm-6:00am which pays the rate of payrate plus an additional $2.00. The employer wants to make sure that the Employee is only paid based on the Swing shift rate and no more.

To do so we want to make sure that the differential he gets is based on the majority of his shift (Swing shift). His actual times are an in punch of 2:10pm and an out punch of 10:30pm. If we used the exact times then he would get 30 minutes of Night shift time (Night shift is from 10:00pm-6:00am).

But if we use the the below example we let the times determine the shift and leave out the split script. Then we would edit the script for the Night shift to start the rate at 11:00pm.

if (touches (2:00pm, 10:00pm))
{
category = "Swing";
payrate = payrate+1.00;
}

if (touches (11:00pm, 6:00am))
{
category = "Night";
payrate = payrate+2.00;
}

By moving the times for Night shift back by an hour his 10:30pm out punch will not result in 30 minutes of Night shift and all his time will be for Swing shift. In addition because the Night shift workers will most likely be in shift at or after 11:00pm they will still get their night shift rate.

==Note: Because we are taking an "estimated" time for when employees are most likely to start and end their shift, it can fail if an employee goes beyond the boundaries we set using our estimated touch times. Please make sure your client is aware of this before using this type script.==


ID
252
Category
Training
  FAQ's
Date Created
5/13/2008 5:07:24 PM
Date Updated
9/6/2011 7:29:44 AM
Back to Search Results