X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=6f716f58789bebe0c06d77e760bef31c068213ae;hb=19e183c61f684ff92f5b7c95f09a0a6ca7d7bffe;hp=e726b92fba6eb8c28d39100401cddb8883cd9045;hpb=15d6c066539ad4a33e13dd3b10c41e8c0fffce37;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index e726b92f..6f716f58 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -500,6 +500,9 @@ class ttTeamHelper { // getPredefinedExpenses - obtains predefined expenses for team. static function getPredefinedExpenses($team_id) { + global $user; + $replaceDecimalMark = ('.' != $user->decimal_mark); + $mdb2 = getConnection(); $result = array(); @@ -508,6 +511,8 @@ class ttTeamHelper { $result = array(); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { + if ($replaceDecimalMark) + $val['cost'] = str_replace('.', $user->decimal_mark, $val['cost']); $result[] = $val; } return $result; @@ -810,9 +815,9 @@ class ttTeamHelper { $inactive_teams = array(); $mdb2 = getConnection(); - // Get all team ids for teams created or modified more than 1 year ago. + // Get all team ids for teams created or modified more than 6 months ago. // $ts = date('Y-m-d', strtotime('-1 year')); - $ts = date('Y-m-d', strtotime('-4 month')); + $ts = date('Y-m-d', strtotime('-6 month')); $sql = "select id from tt_teams where timestamp < '$ts' order by id"; $res = $mdb2->query($sql);