// 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;
return true;
}
- // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 50).
+ // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 100).
static function getInactiveTeams() {
$inactive_teams = array();
$mdb2 = getConnection();
$count++;
$inactive_teams[] = $team_id;
// Limit the array size for perfomance by allowing this operation on small chunks only.
- if ($count >= 50) break;
+ if ($count >= 100) break;
}
}
return $inactive_teams;