Premium Policy for Night Differential Shows Incorrect Result

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
allanregistos
Posts: 41
Joined: Wed Oct 21, 2009 11:56 pm
Location: Philippines
Contact:

Premium Policy for Night Differential Shows Incorrect Result

Post by allanregistos »

I have created two premium policies, one for Night differential and the other is for regular overtime, activated after 8 hours of work. However, the pay stub shows incorrect results, night differential shows a negative value which must be positive, and the Regular Overtime is not correct.

Please see attached files to see my configuration.

Thanks,
Allan E. Registos

Night Differential setup:
10percentpremium.png
Regular Overtime setup:
regular-overtime.png
Timesheet Overview:
nightdiff.png
And the Pay Stub:
payslipresult.png
allanregistos
Posts: 41
Joined: Wed Oct 21, 2009 11:56 pm
Location: Philippines
Contact:

Re: Premium Policy for Night Differential Shows Incorrect Result

Post by allanregistos »

I have found this code at line: 873, file: classes/modules/policy/PremiumPolicyFactory.class.php

Code: Select all

case 10: //Pay Factor
				//Since they are already paid for this time with regular or OT, minus 1 from the rate
				$rate = ( $original_hourly_rate * ( $this->getRate() - 1) );
				break;
Given the rate I gave above:
0.10 for Night differential and
1.25 for Regular Overtime*

If I am going to deduct 0.10 - 1 as the code indicates, I now have this negative value: -0.9
and 1.25-1 = 0.25 so
0.25 x 49.2(employee rate/hour) = 12.3 which is what the pay stub shows!
-0.9 x 49.2 = −44.28 which is what the pay stub shows!

Why? What steps should I make to correct this? I don't understand why the developer stated
"Since they are already paid for this time with regular or OT, minus 1 from the rate"
but because it was the published production code, it is not necessary to change that or else I might break something...

***Confusing***

*Note: I am not using Overtime Policies this time because it conflicts with Overtime Night Premium I have setup earlier which has a higher rate than regular Overtime, so if it is possible, I will setup all our overtime policies within Premium Policies.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Premium Policy for Night Differential Shows Incorrect Result

Post by shaunw »

Premium time is over paid out over and above regular time. So if the employee works an 8 hour day, they could have 16, 32, 1000 premium time hours being paid out as well. So since they get their regular time (and/or overtime) plus any premium, the premium policy is design to account for this automatically.

To do what you want, simply change the rate from 0.10, to 1.10. That would pay the employee 10% above their regular wage. However on the pay stubs you will see a rate *difference* from their regular wage, not the full rate itself. So if the employee is paid $10/hr regularly, a 1.10 rate premium time would pay them $1/hour for any premium time, because they already got paid the regular wage for that one hour. If TimeTrex didn't do this the employee would essentially get paid $22/hour instead.
allanregistos
Posts: 41
Joined: Wed Oct 21, 2009 11:56 pm
Location: Philippines
Contact:

Re: Premium Policy for Night Differential Shows Incorrect Result

Post by allanregistos »

shaunw wrote:Premium time is over paid out over and above regular time. So if the employee works an 8 hour day, they could have 16, 32, 1000 premium time hours being paid out as well. So since they get their regular time (and/or overtime) plus any premium, the premium policy is design to account for this automatically.

To do what you want, simply change the rate from 0.10, to 1.10. That would pay the employee 10% above their regular wage. However on the pay stubs you will see a rate *difference* from their regular wage, not the full rate itself. So if the employee is paid $10/hr regularly, a 1.10 rate premium time would pay them $1/hour for any premium time, because they already got paid the regular wage for that one hour. If TimeTrex didn't do this the employee would essentially get paid $22/hour instead.
Thanks for the reply.

So it is safe to setup 10% as 1.10. I think I made a mistake for using premium policy for regular overtime, so i will transfer this to overtime policy.

I acknowledge that it is too complex for me to setup overtime and premium policies because we have shifting schedules, night time and day time and premium pays. I think TimeTrex was designed for that complexity. Also we have employees that were located in a far away location, I am thinking of using the Punch In / Out web form to let them be able to punch in and out remotely. It may take time to set this up.

Thanks again...
Locked