Home      Ask a Question      My Stuff      Help   
  
TimeWorksPlus-Changing HolidayRule Hours to 0 for weekend holidays
Question
ID
1652
Category
<Unassigned>
Date Created
9/10/2015 11:40:27 AM
Date Updated
9/10/2015 12:31:01 PM
My client is only open Monday thru Friday and only pays holiday hours if the holiday falls on a work day. How do I remove the auto holiday hours if the holiday falls on a Saturday or Sunday?
Answer
This allows you to create a default amount of hours paid out automatically for holidays using the "HolidayRule" (TimeWorks Plus: Holiday Rule), then based on if the holiday falls on a Saturday or Sunday (Scripting - Days) adjust those hours using scripting under the "PayRateScript" rule to remove those hours altogether.

In our example we set the default to 8 hours for all employees. This allows them to have the holiday hours added to any holidays that have been selected on the USHolidays rule. In the below example we flag the hours based on:

1. If the day is a holiday
2. If it is a Saturday or Sunday
3. There is an hours only punch present that is equal to 8 hours
4. Is the category for that punch "Holiday"

If so adjust the hours from 8 to 0 hours:

if(reportingdate.isholiday and "SU" contains weekday (punchdate)){
if(ishours and hours = 8 and category = "Holiday"){
category = "Regular";
hours = 0;
}
}

Back to Search Results