X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttInvoiceHelper.class.php;h=fd701fe51c288ef0ed9da9b1fb109dbbc033df7c;hb=6c7a98f61e74aeae700b523729abb49ff19d3704;hp=9fa7e58c38017f67338c10a30a9443718eb0e943;hpb=b7df85b084e9aaecef29ff6712015194f96e0c22;p=timetracker.git diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 9fa7e58c..fd701fe5 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -69,7 +69,9 @@ class ttInvoiceHelper { 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())