Home      Ask a Question      My Stuff      Help   
  
TimeWorksPlus - Meal/Break Penalties
Some states like California have a meal penalty if an employee has worked a certain amount of hours on a shift without taking a break AND OR taking a break too late in the day.

The below calculates:

1. The specified amount of hours total in a day ($penhours2 = 6) for them to be authorized a break.

2. It then calculates if an employee has worked a specified amount of hours without a break ($penhours = 5).

3. If both are met it will pay them an additional hour under a "Meal Penalty" category.

The reasoning behind the different category is that with this most labor laws do not count this extra hour towards overtime as it isn't worked time.

You will need to set up a clock prompt like the following:




The scripting is done in two parts under two different Processing Rules (ReportingDateScript AND AddEntryScript):

- The below part is what looks for the hours to decide if a meal penalty is needed or not:


//Put under "ReportingDateScript" Processing Rule

$penhours = 5; //Change the number after the equal sign to total hours without a break limit.

if(hours > val($penhours) and isfirsttoday)
{
addOnce = 1;
}

// Put under "AddEntryScript" Processing Rule

$penhours2 = 6; //Change the number after the equal sign to the required amount of hours they have to work in a day to be allowed a break.
if(reportingdate.totalday("addOnce") > 0 and reportingdate.totalhours >= val($penhours2)){
addentry("hours", 1, "Meal Penalty");
}
ID
1341
Category
>Support
  Scripting
Date Created
10/23/2014 2:07:16 PM
Date Updated
10/13/2015 11:26:39 AM
Back to Search Results