From: Nik Okuntseff Date: Mon, 18 Feb 2019 14:19:48 +0000 (+0000) Subject: More progress on timesheets. X-Git-Tag: timetracker_1.19-1~318 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b33cf8ebaf54882a2238b660ba07936301077695;p=timetracker.git More progress on timesheets. --- diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index a8276b55..f7cae676 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -78,4 +78,36 @@ class ttTimesheetHelper { return $last_id; } + + // The getTimesheets obtains timesheets for user. + static function getTimesheets($user_id) + { + global $user; + $mdb2 = getConnection(); + + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + // $addPaidStatus = $user->isPluginEnabled('ps'); + $result = array(); + + if ($user->isClient()) + $client_part = "and ts.client_id = $user->client_id"; + + $sql = "select ts.id, ts.name, ts.client_id, c.name as client_name from tt_timesheets ts". + " left join tt_clients c on (c.id = ts.client_id)". + " where ts.status = 1 and ts.group_id = $group_id and ts.org_id = $org_id and ts.user_id = $user_id". + " $client_part order by ts.name"; + $res = $mdb2->query($sql); + $result = array(); + if (!is_a($res, 'PEAR_Error')) { + $dt = new DateAndTime(DB_DATEFORMAT); + while ($val = $res->fetchRow()) { + //if ($addPaidStatus) + // $val['paid'] = ttTimesheetHelper::isPaid($val['id']); + $result[] = $val; + } + } + return $result; + } } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 5309dd8a..36f9163f 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -886,9 +886,4 @@ class ttUser { return false; } - - // getTimesheets obtains timesheets for user. - function getTimesheets() { - return null; // Not implemented. - } } diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f129c9b3..2faa0a10 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -461,6 +461,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d722cb92..b5a5cdc2 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -471,6 +471,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 976d9f3f..ba43617c 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -434,6 +434,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 6ac1c034..fc8f262d 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -412,6 +412,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 5da77cb2..f65f9323 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -408,6 +408,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php 'form.timesheets.hint' => 'Use reports to add new timesheets.', +'form.timesheets.active_timesheets' => 'Active Timesheets', +'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 124bfed7..3cb20b86 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -474,6 +474,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 864fb91e..c489a56a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -437,6 +437,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 501d9572..8c3907ce 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -454,6 +454,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index e400a941..647b8f58 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -439,6 +439,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 3f411e9f..d6ee165e 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -431,6 +431,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 60b312a0..1d048d2b 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -421,6 +421,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5cfe3f20..291425ef 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -461,6 +461,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 46d0bd6c..ea0d7363 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -464,6 +464,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 5215f7f6..b5faa5a8 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -434,6 +434,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 9c01727b..5b4aad61 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -469,6 +469,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 8d5aa443..74d3a8dd 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -467,6 +467,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 1e7146f6..e4b77504 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -408,6 +408,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 6a38cb2a..b1c315e9 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -466,6 +466,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 40167912..a41c703b 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -442,6 +442,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 61f06f35..62676f99 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -437,6 +437,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 09aa8b52..f305c28c 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -445,6 +445,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f8d711f3..1cbc4091 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -469,6 +469,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 6c172c33..02042912 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -400,6 +400,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php 'form.timesheets.hint' => 'Используйте отчёты для добавления новых табелей.', +'form.timesheets.active_timesheets' => 'Активные табели', +'form.timesheets.inactive_timesheets' => 'Неактивные табели', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d79db843..1ae854c2 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -452,6 +452,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index d720907d..5e92e716 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -443,6 +443,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index e5be1d81..c2b9033b 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -440,6 +440,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Forma izveštaja. Pogledajte primer na https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 75a258dd..bce576ae 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -438,6 +438,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b6b3aeb6..4c8c2ad8 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -480,6 +480,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 5eb65a7f..1840f7b3 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -452,6 +452,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 68e50562..f78a36fd 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -460,6 +460,8 @@ $i18n_key_words = array( // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php // TODO: translate the following. // form.timesheets.hint' => 'Use reports to add new timesheets.', +// 'form.timesheets.active_timesheets' => 'Active Timesheets', +// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8e33a487..a91fdab4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {foreach $timesheets as $timesheet} - - + + {if $user->isPluginEnabled('ps')} diff --git a/timesheets.php b/timesheets.php index b2c64e63..4a4eb66f 100644 --- a/timesheets.php +++ b/timesheets.php @@ -28,7 +28,7 @@ require_once('initialize.php'); import('form.Form'); -import('ttGroupHelper'); +import('ttTimesheetHelper'); // Access checks. if (!(ttAccessAllowed('view_own_timesheets') || @@ -46,7 +46,7 @@ if (!$user->isPluginEnabled('ts')) { } // End of access checks. -$timesheets = $user->getTimesheets(); +$timesheets = ttTimesheetHelper::getTimesheets($user->getUser()); $smarty->assign('timesheets', $timesheets); $smarty->assign('title', $i18n->get('title.timesheets'));
 Anuko Time Tracker 1.18.37.4734 | Copyright © Anuko | +  Anuko Time Tracker 1.18.37.4735 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/timesheets.tpl b/WEB-INF/templates/timesheets.tpl index 62606584..796f2720 100644 --- a/WEB-INF/templates/timesheets.tpl +++ b/WEB-INF/templates/timesheets.tpl @@ -19,8 +19,8 @@
{$invoice.name|escape}{$invoice.client_name|escape}{$timesheet.name|escape}{$timesheet.client_name|escape} {$invoice.date}{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}