X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6cdff5151bba8cd6c8bd1bb90b1b2c18457ecb88..7797eda9fb04c217a813db88e00bb9ee541eabbb:/WEB-INF/lib/ttInvoiceHelper.class.php diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 3a8dbe27..13e5dea0 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -73,7 +73,7 @@ class ttInvoiceHelper { if ($user->isClient()) $client_part = " and client_id = $user->client_id"; $sql = "select * from tt_invoices where id = $invoice_id and group_id = ". - $user->getActiveGroup()."$client_part and status = 1"; + $user->getGroup()."$client_part and status = 1"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { if ($val = $res->fetchRow()) @@ -89,7 +89,7 @@ class ttInvoiceHelper { global $user; $sql = "select id from tt_invoices where group_id = ". - $user->getActiveGroup()." and name = ".$mdb2->quote($invoice_name)." and status = 1"; + $user->getGroup()." and name = ".$mdb2->quote($invoice_name)." and status = 1"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); @@ -236,7 +236,7 @@ class ttInvoiceHelper { $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; - $sql = "update tt_invoices set status = NULL where id = $invoice_id and group_id = ".$user->getActiveGroup(); + $sql = "update tt_invoices set status = NULL where id = $invoice_id and group_id = ".$user->getGroup(); $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); } @@ -332,7 +332,7 @@ class ttInvoiceHelper { // Create a new invoice record. $sql = "insert into tt_invoices (group_id, org_id, name, date, client_id) values(". - $user->getActiveGroup().", $user->org_id, ".$mdb2->quote($name).", ".$mdb2->quote($date).", $client_id)"; + $user->getGroup().", $user->org_id, ".$mdb2->quote($name).", ".$mdb2->quote($date).", $client_id)"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false;