X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=16896ac58104301232a9610845653ebf96404bf1;hb=241fff8e23fee4caddf4038ad83df75e8146f1a2;hp=1e6263131c00e9a1ceea25f74d519a14fa020400;hpb=f8292d356ef3ac53b2bb1183dd462f7c453c20e5;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 1e626313..16896ac5 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -363,38 +363,6 @@ class ttTeamHelper { return false; } - // The getActiveInvoices returns an array of active invoices for a group. - static function getActiveInvoices($localizeDates = true) - { - global $user; - $addPaidStatus = $user->isPluginEnabled('ps'); - - $result = array(); - $mdb2 = getConnection(); - - if ($user->isClient()) - $client_part = " and i.client_id = $user->client_id"; - - $sql = "select i.id, i.name, i.date, i.client_id, i.status, c.name as client_name from tt_invoices i - left join tt_clients c on (c.id = i.client_id) - where i.status = 1 and i.group_id = $user->group_id $client_part order by i.name"; - $res = $mdb2->query($sql); - $result = array(); - if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); - while ($val = $res->fetchRow()) { - if ($localizeDates) { - $dt->parseVal($val['date']); - $val['date'] = $dt->toString($user->date_format); - } - if ($addPaidStatus) - $val['paid'] = ttInvoiceHelper::isPaid($val['id']); - $result[] = $val; - } - } - return $result; - } - // The getAllInvoices returns an array of all invoices for a group. static function getAllInvoices() {