From 9caad65374f4a83042c7df04d463448affa3443b Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 12 Feb 2017 15:04:01 +0000 Subject: [PATCH] Work in progress on predefined expenses. --- WEB-INF/lib/ttTeamHelper.class.php | 19 ++++++++++++++++++- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) 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(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e108eb66..0ea9f88b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.37.3573 | Copyright © Anuko | +  Anuko Time Tracker 1.9.37.3574 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1