projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Localized top manager role name in list of active users.
[timetracker.git]
/
WEB-INF
/
lib
/
ttInvoiceHelper.class.php
diff --git
a/WEB-INF/lib/ttInvoiceHelper.class.php
b/WEB-INF/lib/ttInvoiceHelper.class.php
index
9fa7e58
..
fd701fe
100644
(file)
--- a/
WEB-INF/lib/ttInvoiceHelper.class.php
+++ b/
WEB-INF/lib/ttInvoiceHelper.class.php
@@
-69,7
+69,9
@@
class ttInvoiceHelper {
global $user;
$mdb2 = getConnection();
global $user;
$mdb2 = getConnection();
- $sql = "select * from tt_invoices where id = $invoice_id and team_id = $user->team_id and status = 1";
+ if ($user->isClient()) $client_part = " and client_id = $user->client_id";
+
+ $sql = "select * from tt_invoices where id = $invoice_id and team_id = $user->team_id $client_part and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
if ($val = $res->fetchRow())
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
if ($val = $res->fetchRow())