X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=52f24fc67892f8300e7adaa2334b8de117377cc3;hb=60d2288b7fca6caf0f5d9d3eee972f040eb24fb0;hp=b27e04d1f2e1ebf6359ec4693f6a8c2f04d0ec8e;hpb=7c7f99a838bd065066e0439bc1ea61014571b182;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index b27e04d1..52f24fc6 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -498,6 +498,23 @@ class ttTeamHelper { return false; } + // getPredefinedExpenses - obtains predefined expenses for team. + static function getPredefinedExpenses($team_id) { + $mdb2 = getConnection(); + + $result = array(); + $sql = "select id, name, cost from tt_predefined_expenses where team_id = $team_id"; + $res = $mdb2->query($sql); + $result = array(); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + $result[] = $val; + } + return $result; + } + return false; + } + // getNotifications - obtains notification descriptions for team. static function getNotifications($team_id) { $mdb2 = getConnection(); @@ -517,7 +534,7 @@ class ttTeamHelper { return false; } - // getNotifications - obtains monthly quotas for team. + // getMonthlyQuotas - obtains monthly quotas for team. static function getMonthlyQuotas($team_id) { $mdb2 = getConnection();