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 git-svn-id: svn://10.0.0.236/trunk@169259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7350946aae
commit
770e77bbbc
@ -97,8 +97,9 @@
|
||||
// subtracts time spent from remaining time
|
||||
var new_time;
|
||||
|
||||
// prevent negative values if work_time > fRemainingTime
|
||||
new_time =
|
||||
fRemainingTime - document.changeform.work_time.value;
|
||||
Math.max(fRemainingTime - document.changeform.work_time.value, 0.0);
|
||||
// get upto 2 decimal places
|
||||
document.changeform.remaining_time.value =
|
||||
Math.round(new_time * 100)/100;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user