Hey everyone!

I'm almost finished this payroll system that automatically calculates employee's wages, gross wages, total income, deductions and nett wages, etc based on the info provided (i.e. hours worked and rate/hour).

For the most part everything works, except for the total income, total deduction (and possibly only because of these, but i don't know for sure) the Nett wages field (Total income - Total deductions).

So the problem is this: Total income adds the correct incomes to it and total deductions adds the correct deductions to it. But if the value has a remainder of less than 50, i.e R1000.45, in the totals value it will round it down to R1000.00 and if its over 50, it will round it up (i.e. R1000.87 becomes R1001.00)

This is quite a major problem for the user as its extremely important that the caluculations are correct down to the last cent. I have checked and rechecked my database (Access) that is connected to the program, and all the monetary fields are set as Currency with 2 decimal places.

Any idea's why these specific fields are rounding off? Its only these 2 (or 3) fields that are doing it, plus another 2 (Union dues and provident fund - they won't even allow the user to enter a number that isn't whole into their fields).

I'd appreciate any advice

8 Years
Discussion Span
Last Post by onaclov2000

Code would be appreciated, it's difficult to troubleshoot if we can't see the implementation

Thank you,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.