From: <guy...@us...> - 2003-11-14 21:03:38
|
Update of /cvsroot/outreach/opt/tasks/task In directory sc8-pr-cvs1:/tmp/cvs-serv12846/tasks/task Modified Files: display.inc mod_status.inc Log Message: Applying patch from Shubhankar Bera that ensures that tasks and timesheets allow the following types of times to be entered: 1) Hours (4) 2) Hours:Minutes (4:30) 3) Decimal (4.5) Also the display of hours worked now uses two decimal places rather than just one. Index: display.inc =================================================================== RCS file: /cvsroot/outreach/opt/tasks/task/display.inc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** display.inc 6 Oct 2003 02:01:13 -0000 1.13 --- display.inc 14 Nov 2003 21:03:25 -0000 1.14 *************** *** 566,570 **** </td> <td class="small"> ! <? echo(__("[h] or [h:m] format")); ?> </td> </tr> --- 566,570 ---- </td> <td class="small"> ! <? echo(__("[h] or [h:m] or decimal (i.e. 1.5)")); ?> </td> </tr> Index: mod_status.inc =================================================================== RCS file: /cvsroot/outreach/opt/tasks/task/mod_status.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mod_status.inc 8 Oct 2003 21:33:07 -0000 1.5 --- mod_status.inc 14 Nov 2003 21:03:25 -0000 1.6 *************** *** 76,82 **** if (($complete!=$oldprog) || ($worked)) { $work_count=sizeOf(explode(":",$worked)); ! if ($work_count==1) { ! $worked.=":00:00"; ! } elseif ($work_count==2) { $worked.=":00"; } --- 76,95 ---- if (($complete!=$oldprog) || ($worked)) { $work_count=sizeOf(explode(":",$worked)); ! if ($work_count==1) ! { ! $work_count_dec=sizeOf(explode(".",$worked)); ! if ($work_count_dec==2) ! { ! $hours = (int) (($worked*100)/100); ! $minutes = ((int) (($worked*100)%100))*60/100; ! $worked = "" . $hours . ":" . "$minutes" . ":00"; ! } ! else ! { ! $worked.=":00:00"; ! } ! } ! elseif ($work_count==2) ! { $worked.=":00"; } |