|
The rounding in Ace Payroll is designed so that at all times money is owed by the employee to the employer.
An employer is not allowed by law to make unauthorised deductions from an employee's wages, so the system advances money to the employee to round their wages to the
rounding amount you specify, until a sufficient amount has been advanced in previous pay periods to make a deduction from the employee, the total amount of which never exceeds the accumulated advances.
The exact logic is complicated and is probably best described by showing the actual computer code in Ace Payroll that performs the rounding calculation
procedure tEmpUpdte.RoundNett;
var
N,R,RoundTo : real;
begin
fThisRound := 0.0;
N := Rounded(fThisNett);
RoundTo := CoinAmount(PSR.RoundingAmount);
if N >= 0.0 then begin
{leave negative nett pays alone. probably adjusting payment using
the OneOffPay routine. dont confuse the issue by rounding the pay}
if not inherited IsPaidCash then begin
if NonZero(Rec.AccumulatedRoundingBal) then begin
{employee may have been changed to cheque but still have
RoundingBal to be accounted for}
if N >= Rec.AccumulatedRoundingBal then
fThisRound := (- 1 * Rec.AccumulatedRoundingBal)
else fThisRound := Rec.AccumulatedRoundingBal - N;
end; {if AccumulatedRoundingBal still to be taken care of}
exit;
end; {if HowPaid = Cash}
R := (fThisNett - Rec.AccumulatedRoundingBal +
((RoundTo/2)-0.001))/RoundTo;
{take the amount they have accumulated in rounding overpayments
away from their nett pay. add half the rounding amount so pay
is always rounded upwards. deduct very small amount from half
the rounding amount so amounts that are already rounded will
not be rounded to next level}
R := Round(R);
R := Rounded(R * RoundTo);
fThisRound := R - N;
end;
end;
More On Cash Payments
|