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();
return false;
}
- // getNotifications - obtains monthly quotas for team.
+ // getMonthlyQuotas - obtains monthly quotas for team.
static function getMonthlyQuotas($team_id) {
$mdb2 = getConnection();
// The update function updates team information.
static function update($team_id, $fields)
{
- // We'll require team name to be always set.
- if (!isset($fields['name']) || $fields['name'] == "") return false;
-
$mdb2 = getConnection();
$name_part = 'name = '.$mdb2->quote($fields['name']);
$currency_part = '';