Home      Ask a Question      My Stuff      Help   
  
SUPPORT: SCRIPTING: New Indirect
// Make sure you add a hidden web only numeric prompt with the field name of otherHoursSoFar


// Change the next three variables to what you need, pipe delimited for the category lists
$otherCategories = "Vacation|Holiday|Bereavement|Double Time|Holiday Double Time|Jury Duty|PTO";
$promoteCategories = "Regular";
$weeklyOTThreshold = 40;
if(within(category, $otherCategories)){
otherHoursSoFar = hours;
}
ot1threshold = $weeklyOTThreshold;

$otweekhours = reportingdate.weekhours($otherCategories + "|" + $promoteCategories);
$otherWeekHours = reportingdate.weekhours($otherCategories);
$otherHoursSoFarThisWeek = reportingdate.totalweek("otherHoursSoFar");
$otherHoursLeftThisWeek = $otherWeekHours - $otherHoursSoFarThisWeek;

if($otweekhours > $weeklyOTThreshold and within(category, $promoteCategories)){
ot1threshold = $weeklyOTThreshold - $otherHoursLeftThisWeek;
}

if(within(category, $otherCategories)){
ot1threshold = 400;
}


CC 9/20/2017
ID
1891
Category
>Support
  Scripting
Date Created
9/20/2017 10:29:20 AM
Date Updated
12/11/2017 9:51:34 AM
Back to Search Results