X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/f58cc6f6d6403f4eb01e4f6dfa4058afc927970c..813f43a9406fb5adfb8c6e89cd97b06a11da58c9:/WEB-INF/lib/ttTimeHelper.class.php diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 7bc5e646..222bcca4 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -474,7 +474,7 @@ class ttTimeHelper { $billable_part = $fields['billable'] ? ', billable = 1' : ', billable = 0'; } $paid_part = ''; - if ($user->canManageTeam() && $user->isPluginEnabled('ps')) { + if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) { $paid_part = $fields['paid'] ? ', paid = 1' : ', paid = 0'; } @@ -595,8 +595,8 @@ class ttTimeHelper { // $record_id - optional record id we may be editing, excluded from overlap set static function overlaps($user_id, $date, $start, $finish, $record_id = null) { // Do not bother checking if we allow overlaps. - if (defined('ALLOW_OVERLAP') && ALLOW_OVERLAP == true) - return false; + global $user; + if ($user->allow_overlap) return false; $mdb2 = getConnection();