Home      Ask a Question      My Stuff      Help   
  
TimeWorksPlus: Pay for Breaks Up to a Certain Amount
This script is for clients that require an employee to clock IN and OUT of breaks/lunches for tracking purposes but want to pay those breaks back, up to a certain amount.

In the script example below a company pays their employees UP TO 30 minute breaks. Meaning, if they go over 30 minutes they only get paid for the 30 minutes OR if they clock OUT for less than 30 minutes they only get paid for the time they were clocked out.

$paidmin = 30;

$pbreak = $paidmin /60;

$out = (val(reportingdate.spread) / 3600 - reportingdate.totalhours);

if (islasttoday AND outispresent and Isfirsttoday = false)
{
if ($out >= $pbreak) {hours = hours + $pbreak; addalert (cstr($paidmin) + " min Paid Break");}
if ($out < $pbreak) {hours = hours + $out; $out2 = round($out * 60,2); addalert (cstr($out2) + " min Paid Break");}
}

The first line's amount is the only thing you need to adjust. If your amount is anything other than 30, you would just change that amount in the first line "$Paidmin = 30;". For example if I wanted 15 minute breaks it would be "$Paidmin = 15;".

How this works is it looks for all time between the first IN to the last OUT of the day and subtracts the total hours actually clocked IN (worked) to come up with a total of out time. It then compares this to our $Paidmin time and if it is over 30 pays them 30 minutes on the last punch of the day. If it is less it pays them back all out time.

Note: this will not work if there are any missing punches as it needs all punches to be present for it to do the calculation correctly.

The script should be entered under Settings Menu --> Processing Rules --> PayRateScript.
ID
1078
Category
<Unassigned>
Date Created
1/20/2014 7:25:24 AM
Date Updated
10/3/2017 2:45:18 PM
Back to Search Results