Shift premium, basic
Award a shift premium for all worked hours between a start and end time (e.g. 2nd shift). A minimum number of hours can be specified along with the days of the week which qualify
Details
Rule Type
Time
Execution
After shift
Parameters
Name | DataType | DefaultValue | Description |
---|---|---|---|
Start time | time | The start time of the shift premium | |
Stop time | time | The stop time of the shift premium | |
Days of week | list | The days of the week for which the shift premium is available | |
Rate Table | lookup | The rate table to use for awarding pay during this shift premium schedule | |
Minimum hours | float | 0 | The minimum number of hours needed before the shift premium is paid out (prevents paying out small overlaps from other shifts) |
HourType | lookup | The earnings code to use for the REG portion of any awarded shift premium |
Decision Tree
Rule processing begins in the cell R1:Level1 and proceeds right/down. Any IF statement which results in a DONE step terminates the rule immediately.
Line# | Level1 | Level2 | Level3 | Comment |
---|---|---|---|---|
1 | Start | |||
2 | IF(DAY_OF_WEEK(PayDate ) not in Days of week ) → | ↓ | Is the shift premium available on the current paydate? | |
3 | ↓ | DONE | ||
4 | SET(defaultrate = LOOKUP(ShiftPremiums , Rate Table , Code , DefaultRate )) | Lookup the Default Rate in the Rate Table | ||
5 | SET(rate = BEST_FIT_ITEMS(ShiftPremiums , Code , Rate Table , Rates , FIND(employee , ``), EffectiveDate , ExpireDate , Rate )) | Find the best fit rate from the rate table for the given employee | ||
6 | SET(bestrate = GREATER(rate , defaultrate )) | Compare the the two rates and choose the higher | ||
7 | IF(bestrate = 0 ) → | ↓ | If the best rate is zero, no diff is awarded | |
8 | ↓ | DONE | ||
9 | SET(diffhours = COVERAGE(PayDate , Start time , Stop time , Regular )) | Get the number of regular hours that overlap with the shift premium schedule | ||
10 | SET(diffhrsot = COVERAGE(PayDate , Start time , Stop time , Overtime )) | Get the number of overtime hours that overlap with the shift premium schedule | ||
11 | IF(ADD(diffhours , diffhrsot ) < Minimum hours ) → | ↓ | Don't award if below the minimum coverage hours | |
12 | ↓ | DONE | ||
13 | SET( = INSERT_PREMIUM(PayDate , HourType , diffhours , diffhrsot , bestrate , Rate Table )) | Insert the shift premium as a money entry |