Commit db56c51e authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours Worked" values

Patch by Frederic Buclin <LpSolit@gmail.com> r=wurblzap a=myk
parent 97d97696
...@@ -97,8 +97,9 @@ ...@@ -97,8 +97,9 @@
// subtracts time spent from remaining time // subtracts time spent from remaining time
var new_time; var new_time;
// prevent negative values if work_time > fRemainingTime
new_time = new_time =
fRemainingTime - document.changeform.work_time.value; Math.max(fRemainingTime - document.changeform.work_time.value, 0.0);
// get upto 2 decimal places // get upto 2 decimal places
document.changeform.remaining_time.value = document.changeform.remaining_time.value =
Math.round(new_time * 100)/100; Math.round(new_time * 100)/100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment