Efren writes:
> I guess I didnt word my email properly.
> Management wants the amount to be distributed "in a curve", where if
> you miss less hours of work you get more money. The 160 means 160 hrs.
I'd probably do something like:
add up the number of hours the eligible employees work, and dole out
the bonus pro-rated:
tot_hours := 0;
for each employee do:
hours_missed := hours_per_year - employee_hours_worked;
if hours_missed < 160 then
tot_hours := tot_hours + employee_hours_worked
bonus_per_hour := 75000 / tot_hours;
for each employee do:
if missed less than 160 hours then
display "pay <this employee>" employee_hours_worked * bonus_per_hour
Note: rounding errors ignored.
Another approach, which gives much more weight to not missing hours is to
pro-rate based on the number of hours not missed:
pool_hours := 0;
for each employee do:
hours_missed := hours_per_year - employee_hours_worked;
if hours_missed < 160 then
pool_hours := pool_hours + (160 - hours_missed);
bonus_per_hour := 75000 / pool_hours;
for each employee do:
hours_missed := hours_per_year - employee_hours_worked;
if hours_missed < 160 then
display "pay <this employee>" bonus_per_hour *
(160 - hours_missed);
Note: rounding errors ignored.
--
Stan Sieler [log in to unmask]http://www.allegro.com/sieler.html