X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=b94f6434cb52a908c38ebecf9e2ceda87edcd2c4;hb=97bc3daf3d32a73d2b614eecacfe1abc0639a271;hp=7207087780051d8c8288bf28a8627894309d592b;hpb=fafb0ae8f7098ffafa6799627891bd40f4811a52;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 72070877..b94f6434 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -255,35 +255,14 @@ class ttTeamHelper { return $result; } - // The getRecentInvoices returns an array of recent invoices (max 3) for a client. - static function getRecentInvoices($group_id, $client_id) - { - global $user; - - $result = array(); - $mdb2 = getConnection(); - - $sql = "select i.id, i.name from tt_invoices i - left join tt_clients c on (c.id = i.client_id) - where i.group_id = $group_id and i.status = 1 and c.id = $client_id - order by i.id desc limit 3"; - $res = $mdb2->query($sql); - $result = array(); - if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); - while ($val = $res->fetchRow()) { - $result[] = $val; - } - } - return $result; - } - // getUserToProjectBinds - obtains all user to project binds for a group. static function getUserToProjectBinds($group_id) { $mdb2 = getConnection(); $result = array(); - $sql = "select * from tt_user_project_binds where user_id in (select id from tt_users where group_id = $group_id) order by user_id, status, project_id"; + $sql = "select * from tt_user_project_binds". + " where user_id in (select id from tt_users where group_id = $group_id)". + " and group_id = $group_id order by user_id, status, project_id"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) {