This combination of scripts allows for a split on the last hour of the day. What it initially does is splits one second off of the last punch of the day and then using a rounding script round the times back to their original time before splitting off that second.
In TimeWorks:
if (islasttoday) { split (dateadd("s","-1",outtime)); round ("N1"); }
In TimeWorks Plus:
//"SplitPostReportingDateScript" Processing Rule
if (islasttoday) { split (dateadd("s","-1",outtime),false,true); }
//"PayRateScript" Processing Rule
if (islasttoday AND hours < .016) { hours = 1; } if (category = "Lunch" AND islasttoday = false) { category = "Regular"; }
If you are looking to change the category of the split of second to a new category, you will want to do the following:
//"SplitPostReportingDateScript" Processing Rule
if (islasttoday) { $ogcat = category; category = "New Category"; split (dateadd("s","-1",outtime),false,true); category = $ogcat; }
What this does is it saves the current category, changes it to the "New Category" (where this can be changed to whatever the category should be), splits off the punch so it has the new category name and then we set the original punch's category back to whatever the original category was. For example, if this punch had the category of "Holiday Worked" and you wanted to keep the auto added holiday hours it would end up looking like this:
Holiday Worked: 12:00pm - ... Holiday: ... - 5:00pm | |