[Tutos-commits] CVS: tutos/php timetrack_new.php,1.48,1.49
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
From: Gero K. <gok...@us...> - 2004-02-15 19:11:04
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31395 Modified Files: timetrack_new.php Log Message: fixes Index: timetrack_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_new.php,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- timetrack_new.php 27 Nov 2003 15:35:34 -0000 1.48 +++ timetrack_new.php 15 Feb 2004 19:03:34 -0000 1.49 @@ -128,11 +128,11 @@ } if ($this->obj->ref->getType() == "task") { - if( $this->obj->ref->volume_todo == -1 ) { + if( $this->obj->ref->volume_todo == -1 ) { $volume_todo = $this->obj->ref->volume - $this->obj->ref->volume_done; - } else { + } else { $volume_todo = $this->obj->ref->volume_todo; - } + } echo "<tr>\n"; echo $this->showfieldc($lang['TaskVolumeTodo'],0,"volume_todo"); echo " <td><input size=\"10\" maxlength=\"10\" name=\"volume_todo\">". $lang['hours'] ."</td>\n"; @@ -140,26 +140,28 @@ echo "<td colspan=\"2\"> <i>". $lang['TaskVolumeTodo'] .": ". $volume_todo ." ". $lang['hours'] ."</i></td>"; echo "</tr>"; - } - if( $tutos[useinvoice] ) { - echo "<tr>\n"; + } + + echo "<tr>\n"; + if (!isset($this->obj->ratelist) || (count($this->obj->ratelist) == 0) ) { echo $this->showfieldc($lang['TTcph'],0,"cph"); echo " <td colspan=\"1\"><input size=\"10\" maxlength=\"10\" name=\"cph\" value=\"". number_format($this->obj->cph,2,$lang['DecPoint'],$lang['ThousandPoint']) ."\">\n"; Currency_Select("currency",$this->obj->currency); echo "</td>\n"; - echo $this->showfieldc($lang['TTState'],1,"state"); - echo " <td><select name=\"state\">\n"; - @reset($lang['TTStates']); - while ( list ($s,$x) = @each ($lang['TTStates']) ) { - echo " <option value=\"". $s ."\"". ($this->obj->state == $s ? " selected" : "") .">". $lang['TTStates'][$s] ."</option>\n"; - } - echo "</select></td>\n"; - echo "</tr>\n"; + } else { + echo "<td colspan=\"2\"> </td>"; + } + echo $this->showfieldc($lang['TTState'],1,"state"); + echo " <td><select name=\"state\">\n"; + foreach($lang['TTStates'] as $s => $x) { + echo " <option value=\"". $s ."\"". ($this->obj->state == $s ? " selected" : "") .">". $lang['TTStates'][$s] ."</option>\n"; } + echo "</select></td>\n"; + echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield($lang['Description'],1,"desc"); - echo $this->textarea("desc",3,$table['timetrack']['description'][size], $this->obj->desc ); + echo $this->textarea("desc",3,$table['timetrack']['description'][size], $this->obj->desc ); echo "</tr>\n"; # References to modules @@ -291,6 +293,11 @@ add_module_newlinks($this,$this->obj); + // read the rates possible for this new timetrack + if ( class_exists ("rate") ) { + rate::obj_read($this->obj); + } + web_StackStartLayout($this,"timetrack_new.php","timetrack_new.php?".$_SERVER['QUERY_STRING']); } } |