Update Employee table.

Hi
I am trying to calculate 15% of salary increment for all employees after every 3 years.
I want a report that will calculate this increment and update the salaries of all the employees automatically in the employee table.
How can i archeive this. Any code that can do the magic?
Thanks

First, which country you are from? Payroll is either a localized module or an add-on, depending from country - no worldwide solution may exist because of different legal requirements. So, you must ask your implementator or add-on provider for help, this will be the fastest way.

PS and please don’t copy/paste your post in different topics here - just one instance is enough [:)]

Am from the Gambia and we just develop a simple payroll.I am just trying to have a report that can increase all employee salaries for every 3 years. I am finding it difficult to do. I need your ideas on this especially the auto update of the increment after the report is run on the employee table.

Any sample code or ideas please?

Thanks

In this case you yourself happen to be the person knowing the things best [;)]

You can solve this in different ways - Report, CodeUnit. Exact code depends on your data structures.

One additional idea - maybe it makes sense to hold Salary Amounts in a separate table, not Employee card, this will allow you to keep history of salaries and adjust them correctly - fields might be Employee No, Date Effective, Salary Amount.

BTW, expanding this table a little, you can also keep there other Employee parameters, which change by time.

Can’t some code be writtenon the report or table to perform the increment? If a seperate table is to be used for this adjustment, how can you do this on that. Any code for that table.

thanks

Yes, code can be added to Report that updates/inserts data in Tables (NAV Reports are such a tricky thing, allowing to CHANGE data, not only presenting information based on data - have never seen any other report writer in the world capable - and allowed - to do so)

BUT - sorry, I can’t help you with coding [*-)] , I’m not a programmer, only a consultant/analyst/PM, so here only other DUG members can help you. There are a lot of them, and many are really gurus in coding, hope someone of them looks at this thread and help you out…

Oh, Ok. thanks for the advice you gave me. Am also not a programmer but trying to learn.

Can any progrmmer help me out with this.

Thanks.

It depends on how you have structured your payroll.

If you have stored the basic salary in the employee table. you can use a report:

  1. Include the employee table as a data item

  2. On AfterGetRecord for the employee data item write something like:

basicsalary := basicsalary * 1.15;

modify;

If the salary details are stored in another table you will need to do the same for that particular table, but please remember to filter for the current period, otherwise you will end up changing historical data.

I will try this . What do you mean by " If the salary details are stored in another table you will need to do the same for that particular table, but please remember to filter for the current period, otherwise you will end up changing historical data. "

When designing a payroll, there are different ways to store the salary of the employee (e.g. $1,500). One of them involves storing the salary directly on the employee table, such that after three years when an emplyee’s salary is increased (e.g. to $2,000), a user goes and types-over (replaces) the old salary, thus losing the historical figure.

The other option involves having salaries stored on a salaryhistory table, where against each employee number, you will be having a date, or payroll period when a salary was effective, and then the salary figure. For example:

Employee Period Salary
D-002 Jan-07 $1,100
D-002 Jun-07 $1,500
D-002 Jan-08 $2,000

If we intend to change the current salary, we will need to filter and exclude Jan-07, and Jun-07.

I recomend, that you get in touch with the solution center that customised/supplied your payroll, so that you can get a better understanding of how your payroll was designed.