Fixed predefined expenses logic for comma as decimal mark.
[timetracker.git] / WEB-INF / lib / ttProjectHelper.class.php
index 19e01d3..06605c7 100644 (file)
@@ -67,6 +67,7 @@ class ttProjectHelper {
     $res = $mdb2->query($sql);
     if (!is_a($res, 'PEAR_Error')) {
       while ($val = $res->fetchRow()) {
+        $val['rate'] = str_replace('.', $user->decimal_mark, $val['rate']);
         $result[] = $val;
       }
     }
@@ -76,9 +77,9 @@ class ttProjectHelper {
   // getProjects - returns an array of active and inactive projects in a team.
   static function getProjects()
   {
-       global $user;
-               
-       $result = array();
+    global $user;
+
+    $result = array();
     $mdb2 = getConnection();
     
     $sql = "select id, name, tasks from tt_projects