Created two Premium Policies - MIDPRM and AFTPRM
Both are date/time type, no start/end dates, no end time, no inclusion of partial punches and active after 00:00 daily/weekly - effective every day... 00:00 min/max.. pay type pay + premium (include meal policy in calc).
Start time on MIDPRM is 6:00pm.. Premium amount is $0.60
Start time on AFTPRM is 9:00am.. Premium amount is $0.50
Our contract stipulates if employee starts shift 6:00pm or later, they are entitled to midnight premium, and if shift starts at 9:00am or later they are entitled to afternoon premium.. BUT not both.
AFTPRM is attached to "AFT" Policy Group
MIDPRM is attached to "MID" Policy Group
Neither is attached to "DAY" Policy Group
The above setup works fine in the "normal" scenario.. ie. employee in "AFT" policy group works the afternoon shift, and employee in the "MID" policy group works the midnight shift.
But IF, for example, and employee from the "DAY" policy group works an afternoon or midnight shift, the premium doesn't kick in because premiums are tied to policy groups and not to shifts.
It would be great if premium policies were tied to schedule policies.
If I enable both premium policies to all policy groups.. the midnight shift gets both premiums. ug..
Any way around this?
-Bob
Afternoon and Midnight Premiums
Yes, use start and end times, and make sure to not check "Include Partial Punches"
For example,
AFTPRM starts at 9AM, ends at 5:59PM
MIDPRM starts at 6PM, ends at ...
You should then be able to assign these policies to all employees and have them applied correctly.
Shifts that start between 9AM and 5:59PM get the AFTPRM, and shifts that start after 6PM get the MIDPRM, but because partial punches are not included, only one premium will be assigned at a time, even if a shift starts at like 1PM and ends at 8PM (only AFRPRM will be applied in this case for the entire 7 your shift).
For example,
AFTPRM starts at 9AM, ends at 5:59PM
MIDPRM starts at 6PM, ends at ...
You should then be able to assign these policies to all employees and have them applied correctly.
Shifts that start between 9AM and 5:59PM get the AFTPRM, and shifts that start after 6PM get the MIDPRM, but because partial punches are not included, only one premium will be assigned at a time, even if a shift starts at like 1PM and ends at 8PM (only AFRPRM will be applied in this case for the entire 7 your shift).
Actually I had tried what you suggested, and it doesn't work in one scenario..
For midnight shift (punching at 11pm).. it picks up both premiums (even though the window for AFTPRM is 9am - 5:59pm), and it assigns 8:00 to both!
Afternoon shift only picks AFTPRM which is good/expected, and day shift picks up neither - again as expected.
Also - Include partial punches is not checked in either premium.
For midnight shift (punching at 11pm).. it picks up both premiums (even though the window for AFTPRM is 9am - 5:59pm), and it assigns 8:00 to both!
Afternoon shift only picks AFTPRM which is good/expected, and day shift picks up neither - again as expected.
Also - Include partial punches is not checked in either premium.
I mentioned this to our developers and it looks like there is a strange bug that in this exact scenario where the out punch is after midnight and the time restrictions are not, the premium policy is extending the window to the next day so punches are mistakenly being applied to that premium policy.
This will be fixed in the next version of TimeTrex, but in the mean time if you modify the following file:
classes/modules/policy/PremiumPolicyFactory.class.php around line 1394:
Change this line:
To this:
Basically the last variable is changed from $out_epoch to $in_epoch. Save the file, then re-calculate the employees timesheet and it should correct the issue.
This will be fixed in the next version of TimeTrex, but in the mean time if you modify the following file:
classes/modules/policy/PremiumPolicyFactory.class.php around line 1394:
Change this line:
Code: Select all
$end_time_stamp = TTDate::getTimeLockedDate( $this->getEndTime(), $out_epoch);
Code: Select all
$end_time_stamp = TTDate::getTimeLockedDate( $this->getEndTime(), $in_epoch);