I'm doing maintenance on this project the code don't have documentation and is hard. so I'm going with the problem. I'm fetching from the database .115 and when I'm doing the calculation for tax purpose I know the result from 1.00 * .115 is rounded to .12
So the Sub Total: 1.00 Tax: .012 Total: 1.11
I don't know how this happen.
This is my code for javascript
subT += pPrice * $('#qtySearch').val();
tax += pPrice * $('#qtySearch').val() * pTax;
total = tax + subT;
I tried Math.round and toFixed() to get this fixed but i don't have any good results
Any help will be appreciated.