Hello CK,
in payroll in france, the rates of some employee reductions or company
contributions change almost every year. When I try to change the rate in one
of the items without changing the field identifier, It wouldn't save and
give an error (record already exists). I think this way of operating appears
in other modules (ck_chart), but I have settled the other issues and my
chart of accounts has stabilized since.
I could create a new company contribution or employe contribution every time
a rate changes, but the new contribution would need to be applied to each
employee individually (and the old one deleted), since the functionnality of
applying a new contribution to a set of employees doesn't exist. What do you
think would be the best way to solve this problem?
Cheers
Vincent
Hi, Vincent,
Thank you for highlighting the bug.
To edit an existing employee summary level reduction type without
changing the field identifier, please modify,
......./ck-payroll/inc/class.reductn.inc.php,
below (circa) line 126: $t->set_var('name',$dt['name']) ;
add the line, $t->set_var('oldname',$dt['oldname']) ;
To edit an existing company contribution type without changing the field
identifier, please modify, ......./ck-payroll/inc/class.contri.inc.php,
below (circa) line 126: $t->set_var('name',$dt['name']) ;
add the line, $t->set_var('oldname',$dt['oldname']) ;
However, before introducing these changes to your production systems,
please test to make sure that, within your production environment, any
actual change to your current reduction and/or contribution rate does
not affect historical payroll records, eg,
Staff ABC payroll record:
Salary
reduction rate Net Salary
July 2006 month end 10,000 0.05
9500
reduction rate (0.05 changed to 0.01) during Aug 2006.
In September 2006, payroll record should look like,
July 2006 month end 10,000
0.05 9500
Aug 2006 month end 10,000 0.01
9900
I remember specifically designing for this when writing ck-payroll.
However, accuracy of a staff's historical payroll record could well be
the bone of contention when an employee resigns and/or retires in twenty
years time, when everyone's memory becomes so blurred, and the blaming
game becomes. So, can't be too careful about it.
I'll look thru' the codebase to see if similar bugs exist in other areas.
Cheers,
CK
Vincent Cardon wrote:
> Hello CK,
> in payroll in france, the rates of some employee reductions or company
> contributions change almost every year. When I try to change the rate
> in one of the items without changing the field identifier, It wouldn't
> save and give an error (record already exists). I think this way of
> operating appears in other modules (ck_chart), but I have settled the
> other issues and my chart of accounts has stabilized since.
> I could create a new company contribution or employe contribution
> every time a rate changes, but the new contribution would need to be
> applied to each employee individually (and the old one deleted), since
> the functionnality of applying a new contribution to a set of
> employees doesn't exist. What do you think would be the best way to
> solve this problem?
> Cheers
> Vincent