Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Basically, I'm creating an EmployeeManagementSystem.

I basically want to know how to add a value on to a running total every hour.

The reason is because of the payrol.

I want to add a wage of £15.50 to the running total of that persons wage.

So every hour that goes by i want £15.50 to be added onto the running total, and it would keep updating the total that is withing a database.

Thanks.
Posted
Comments
[no name] 6-Apr-14 19:58pm    
Okay so add £15.50 to the employee wage every hour. What is the problem? What have you tried?
[no name] 6-Apr-14 19:59pm    
But thats the thing, I actually dont know the code to be able to add a value to a running total everyhour.
chaau 6-Apr-14 20:02pm    
Just a small hint: to "add" values you need to use a "+" operator. Applies to every programming language. Do you want to ask a question about how to take away a value?
[no name] 6-Apr-14 20:04pm    
Look, without the sarcastic attitude. I know how to add to a running total. I just don't know how to add it at EVERY HOUR. What is the code to add to the running total EVERY HOUR.

Like i hardly believe it is

runningTotal = runningTotal + value @ EVERYHOUR
[no name] 6-Apr-14 20:15pm    
Well actually.... it is. It's going to depend on what platform you are programming against, which you did not tell us. And which timer you are using, which you also did not tell us. But yeah it's going to be something like runningTotal = runningTotal + 15.50
The major thing that you are forgetting is that we cannot see your screen, see your code or read your mind to know what it is that you are doing or was error you see on your screen. We only know what you tell us. To add values, you use the "+" operator. You have basically asked us to guess at everything else.

1 solution

I would think recording start time and end time data would provide a much more robust system.

It would make it much easier to audit the results.

This is how every other payroll system I've seen works.

Payroll is one of those nasty systems where verifiability is extremely important.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900