Premium Policy doesn't seem to catch the correct hours

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
srosariomd
Posts: 4
Joined: Tue Feb 25, 2020 5:37 pm

Premium Policy doesn't seem to catch the correct hours

Post by srosariomd »

Hello,

I am working with TT CE 12.0.5 on Debian Buster, used the deb package to install, and in the process of setting up policies to make TT a viable payroll solution for our company.

I'm in the Philippines. I am trying to set up a premium policy for night shift differential, which pays 10% more for hours worked between the hours of 10 pm and 6 am. I am aware there are other forum posts related to doing the same.

I have created the policy under Premium Policy: Date/Time, and set up Pay Code and Pay Formula. Contributing Shift is set to Regular + OT. Start time is 10PM, End time is 6AM. All other parameters left as default. Seemed pretty straight forward.

Next, I created a test user and populated a time sheet. I set up for single punch in, single punch out, and have a policy auto-deducting 1 hour for lunch. On a two week time period, with 6 work days a week, I filled in the first week with 6 days of Punch In at 8:00AM, Punch Out at 5:00PM. The second week is 6 days of Punch In at 3:00PM, Punch Out at 12:00AM midnight.

I then calculated the time sheet, and got 36 hours out of the 96 work hours being classified as night shift. The policy seemed to catch 6 hours from each day of the first week (6x6=36) and caught nothing from the second week. What I would have expected would be 12 hours of night shift, or catching 2 hours per shift (from 10PM to 12AM). Doesn't seem to make any sense. Perhaps an odd locale or time zone setting?

Any assistance would be appreciated, thanks.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by shaunw »

Do all employee records (even administrators) have the same timezone specified in TimeTrex?

Can you also please include screenshots showing your premium policy settings (edit screen, showing the exact settings on each tab), and the example employees timesheet for each week.
srosariomd
Posts: 4
Joined: Tue Feb 25, 2020 5:37 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by srosariomd »

Hi Shaun,

Thanks for the reply. Sending screenshots isn't very convenient from my current device, but I don't think they will be needed after all.

I had created the employee but created all the punches for it administratively. I had never tried logging in as the test employee.

When I did, I saw that the employee's settings were set to GMT, while my admin account and the timezone set in my timetrex.ini.php is Asia/Manila. That would certainly account for the discrepancy. The policy is otherwise calculating correctly.

A few points to mention though.
1. The reason I didn't think to check the timezone is that the setting isn't anywhere to be set on the employee edit page. I did take care to populate the employee's country as Philippines, but that doesn't seem to have bearing on this.

2. Why would a new employee be created with a default timezone of GMT in the first place, when I have Asia/Manila set in my timetrex.ini.php?

3. Why would a policy based on a time choose to honor the home time zone rather than the time zone of an employee? While I don't foresee having employees in different time zones, seems to me that if you want to capture hours for an employee night shift as I am doing, you'd want the policy to reliably apply to the hours when it's actually night for the employee, not shift to the time zone of the admin, home server, or any other user. I don't see time zone settings anywhere in the policy settings either, so if this is hard coded behavior then I guess the expectation for a company with employees in multiple timezones would have to create a separate policy for each timezone and apply them per employee?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by shaunw »

The reason I didn't think to check the timezone is that the setting isn't anywhere to be set on the employee edit page. I did take care to populate the employee's country as Philippines, but that doesn't seem to have bearing on this.
As an Administrator you can go to Employee -> Preferences to view/edit all employees preferences.

Why would a new employee be created with a default timezone of GMT in the first place, when I have Asia/Manila set in my timetrex.ini.php?
Check Employee -> New Hire Defaults, Employee Preferences tab, that is where all the new hire defaults are specified.

I don't see time zone settings anywhere in the policy settings either, so if this is hard coded behavior then I guess the expectation for a company with employees in multiple timezones would have to create a separate policy for each timezone and apply them per employee?
That is correct.
srosariomd
Posts: 4
Joined: Tue Feb 25, 2020 5:37 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by srosariomd »

srosariomd wrote: Wed Feb 26, 2020 5:27 pm When I did, I saw that the employee's settings were set to GMT, while my admin account and the timezone set in my timetrex.ini.php is Asia/Manila. That would certainly account for the discrepancy. The policy is otherwise calculating correctly.
I take that back. I've now logged in as the test employee, and changed its timezone to Asia/Manila. I've verified again that timetrex.ini.php is set to Asia/Manila, and that my own admin account is also set to Asia/Manila.

Recalculating the timesheet now gives me zero premium hours for the first week of 8AM in, 5PM out, which is correct. However, for the second week of 3PM in, 12AM out, it only counts 6 hours total, or 1 per day. Again, I would expect 12 hours total, or 2 per day.

Apologies again for lack of screenshot at this time, though I hope I'm being descriptive enough: if I have an punch in at 3PM, and an out punch at 12AM, and the policy has a start time of 10PM, with an end time of 6AM, and all timezone issues have been addressed, why wouldn't the policy see 2 hours per day between 10PM and 12AM?
srosariomd
Posts: 4
Joined: Tue Feb 25, 2020 5:37 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by srosariomd »

srosariomd wrote: Wed Feb 26, 2020 6:03 pm if I have an punch in at 3PM, and an out punch at 12AM, and the policy has a start time of 10PM, with an end time of 6AM, and all timezone issues have been addressed, why wouldn't the policy see 2 hours per day between 10PM and 12AM?
Wanted to update that when I disabled my meal policy with an auto-deduction of 1 hour, then the policy catches the two hours as expected.

Why does it appear that the deducted meal hour being counted against the test employee's premium time? What configuration data should I be looking at?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Premium Policy doesn't seem to catch the correct hours

Post by shaunw »

srosariomd wrote: Wed Feb 26, 2020 7:34 pm Wanted to update that when I disabled my meal policy with an auto-deduction of 1 hour, then the policy catches the two hours as expected.

Why does it appear that the deducted meal hour being counted against the test employee's premium time? What configuration data should I be looking at?
In the Premium Policy settings, its based on the Contributing Shift Policy selected there (and by relation the Contributing Pay Codes set in the Contributing Shift Policy). If those include meal policy pay codes, then that is considered when calculating the premium.
Post Reply