// getPredefinedExpenses - obtains predefined expenses for team.
static function getPredefinedExpenses($team_id) {
+ global $user;
+ $replaceDecimalMark = ('.' != $user->decimal_mark);
+
$mdb2 = getConnection();
$result = array();
$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;
$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);