From a4a45a19de0987b40ea0452fea3cd50647756a22 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 23 Feb 2019 18:45:44 +0000 Subject: [PATCH] Some more work in progress on timesheet reporting. --- WEB-INF/lib/ttReportHelper.class.php | 78 +++++++++++++++++++++++----- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 3 +- WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- reports.php | 6 ++- 33 files changed, 103 insertions(+), 15 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index c96f0f4d..a14313b3 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -33,6 +33,14 @@ import('ttTimeHelper'); require_once(dirname(__FILE__).'/../../plugins/CustomFields.class.php'); +// Definitions of types for timesheet dropdown. +define('TIMESHEET_ALL', 0); // Include all records. +define('TIMESHEET_NOT_ASSIGNED', 1); // Include records not assigned to timesheets. +define('TIMESHEET_ASSIGNED', 2); // Include records assigned to timesheets. +define('TIMESHEET_PENDING', 3); // Include records in submitted timesheets that are pending manager approval. +define('TIMESHEET_APPROVED', 4); // Include records in approved timesheets. +define('TIMESHEET_NOT_APPROVED', 5); // Include records in disapproved timesheets. + // Class ttReportHelper is used for help with reports. class ttReportHelper { @@ -62,8 +70,8 @@ class ttReportHelper { if ($options['billable']=='2') $dropdown_parts .= ' and l.billable = 0'; if ($options['invoice']=='1') $dropdown_parts .= ' and l.invoice_id is not null'; if ($options['invoice']=='2') $dropdown_parts .= ' and l.invoice_id is null'; - if ($options['timesheet']=='1') $dropdown_parts .= ' and l.timesheet_id is not null'; - if ($options['timesheet']=='2') $dropdown_parts .= ' and l.timesheet_id is null'; + if ($options['timesheet']==TIMESHEET_NOT_ASSIGNED) $dropdown_parts .= ' and l.timesheet_id is null'; + if ($options['timesheet']==TIMESHEET_ASSIGNED) $dropdown_parts .= ' and l.timesheet_id is not null'; if ($options['paid_status']=='1') $dropdown_parts .= ' and l.paid = 1'; if ($options['paid_status']=='2') $dropdown_parts .= ' and l.paid = 0'; @@ -112,8 +120,8 @@ class ttReportHelper { if ($options['project_id']) $dropdown_parts .= ' and ei.project_id = '.$options['project_id']; if ($options['invoice']=='1') $dropdown_parts .= ' and ei.invoice_id is not null'; if ($options['invoice']=='2') $dropdown_parts .= ' and ei.invoice_id is null'; - if ($options['timesheet']=='1') $dropdown_parts .= ' and ei.timesheet_id is not null'; - if ($options['timesheet']=='2') $dropdown_parts .= ' and ei.timesheet_id is null'; + if ($options['timesheet']==TIMESHEET_NOT_ASSIGNED) $dropdown_parts .= ' and ei.timesheet_id is null'; + if ($options['timesheet']==TIMESHEET_ASSIGNED) $dropdown_parts .= ' and ei.timesheet_id is not null'; if ($options['paid_status']=='1') $dropdown_parts .= ' and ei.paid = 1'; if ($options['paid_status']=='2') $dropdown_parts .= ' and ei.paid = 0'; @@ -264,13 +272,25 @@ class ttReportHelper { } if ($includeCost && MODE_TIME != $trackingMode) $left_joins .= " left join tt_user_project_binds upb on (l.user_id = upb.user_id and l.project_id = upb.project_id)"; - if ($options['show_timesheet']) - $left_joins .= " left join tt_timesheets ts on (l.timesheet_id = ts.id)"; + + // Prepare sql query part for inner joins. + $inner_joins = null; + if ($user->isPluginEnabled('ts')) { + $timesheet_option = $options['timesheet']; + if ($timesheet_option == TIMESHEET_PENDING) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)"; + else if ($timesheet_option == TIMESHEET_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 1)"; + else if ($timesheet_option == TIMESHEET_NOT_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 0)"; + else if ($options['show_timesheet']) + $inner_joins .= " left join tt_timesheets ts on (l.timesheet_id = ts.id)"; // Left join for timesheet nme. + } $where = ttReportHelper::getWhere($options); // Construct sql query for tt_log items. - $sql = "select ".join(', ', $fields)." from tt_log l $left_joins $where"; + $sql = "select ".join(', ', $fields)." from tt_log l $left_joins $inner_joins $where"; // If we don't have expense items (such as when the Expenses plugin is disabled), the above is all sql we need, // with an exception of sorting part, that is added in the end. @@ -335,13 +355,25 @@ class ttReportHelper { $left_joins .= " left join tt_projects p on (p.id = ei.project_id)"; if (($canViewReports || $isClient) && $options['show_invoice']) $left_joins .= " left join tt_invoices i on (i.id = ei.invoice_id and i.status = 1)"; - if ($options['show_timesheet']) - $left_joins .= " left join tt_timesheets ts on (ei.timesheet_id = ts.id)"; + + // Prepare sql query part for inner joins. + $inner_joins = null; + if ($user->isPluginEnabled('ts')) { + $timesheet_option = $options['timesheet']; + if ($timesheet_option == TIMESHEET_PENDING) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)"; + else if ($timesheet_option == TIMESHEET_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 1)"; + else if ($timesheet_option == TIMESHEET_NOT_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 0)"; + else if ($options['show_timesheet']) + $inner_joins .= " left join tt_timesheets ts on (ei.timesheet_id = ts.id)"; // Left join for timesheet name. + } $where = ttReportHelper::getExpenseWhere($options); // Construct sql query for expense items. - $sql_for_expense_items = "select ".join(', ', $fields)." from tt_expense_items ei $left_joins $where"; + $sql_for_expense_items = "select ".join(', ', $fields)." from tt_expense_items ei $left_joins $inner_joins $where"; // Construct a union. $sql = "($sql) union all ($sql_for_expense_items)"; @@ -519,15 +551,37 @@ class ttReportHelper { $left_joins = "left join tt_user_project_binds upb on (l.user_id = upb.user_id and l.project_id = upb.project_id)"; } } + // Prepare sql query part for inner joins. + $inner_joins = null; + if ($user->isPluginEnabled('ts') && $options['timesheet']) { + $timesheet_option = $options['timesheet']; + if ($timesheet_option == TIMESHEET_PENDING) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)"; + else if ($timesheet_option == TIMESHEET_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 1)"; + else if ($timesheet_option == TIMESHEET_NOT_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (l.timesheet_id = ts.id and ts.approval_status = 0)"; + } // Prepare a query for time items. - $sql = "select $time_part $units_part $cost_part from tt_log l $left_joins $where"; + $sql = "select $time_part $units_part $cost_part from tt_log l $left_joins $inner_joins $where"; // If we have expenses, query becomes a bit more complex. if ($options['show_cost'] && $user->isPluginEnabled('ex')) { + // Prepare sql query part for inner joins. + $inner_joins = null; + if ($user->isPluginEnabled('ts') && $options['timesheet']) { + $timesheet_option = $options['timesheet']; + if ($timesheet_option == TIMESHEET_PENDING) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.submit_status = 1 and ts.approval_status is null)"; + else if ($timesheet_option == TIMESHEET_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 1)"; + else if ($timesheet_option == TIMESHEET_NOT_APPROVED) + $inner_joins .= " inner join tt_timesheets ts on (ei.timesheet_id = ts.id and ts.approval_status = 0)"; + } $where = ttReportHelper::getExpenseWhere($options); $sql_for_expenses = "select null as time"; if ($options['show_work_units']) $sql_for_expenses .= ", null as units"; - $sql_for_expenses .= ", sum(cost) as cost, sum(cost) as expenses from tt_expense_items ei $where"; + $sql_for_expenses .= ", sum(cost) as cost, sum(cost) as expenses from tt_expense_items ei $inner_joins $where"; // Create a combined query. $combined = "select sum(time) as time"; diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e303805e..8b3d5d6f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -441,6 +441,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Seleccionar període de temps', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index e85a7397..17ea3e26 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -451,6 +451,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Výberte období', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 3946cd5c..2a786b14 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -417,6 +417,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Vælg en periode', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 3a10a707..5e72116b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -396,6 +396,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Zeitraum auswählen', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 4e6a8efa..1fdd6111 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -234,7 +234,7 @@ $i18n_key_words = array( 'label.quota' => 'Quota', 'label.timesheet' => 'Timesheet', 'label.submitted' => 'Submitted', -'label.form' => 'Approved', +'label.approved' => 'Approved', // Form titles. 'title.error' => 'Error', @@ -392,6 +392,7 @@ $i18n_key_words = array( 'form.reports.include_not_invoiced' => 'not invoiced', 'form.reports.include_assigned' => 'assigned', 'form.reports.include_not_assigned' => 'not assigned', +'form.reports.include_pending' => 'pending', 'form.reports.include_approved' => 'approved', 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Select time period', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 87aff87c..559e3286 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -454,6 +454,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Seleccionar período de tiempo', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index cf2151af..71a1288c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -421,6 +421,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'arveldamata', // TODO: fix as per the above comment, if needed. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 1f4fd0ed..b5bed52c 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -437,6 +437,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'انتخاب بازه زمانی', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 442ce157..c10ca5ea 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -422,6 +422,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Valitse ajanjakso', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 37d0a0f4..b937b771 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -414,6 +414,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Sélectionner la période de temps', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index ecaea1c1..c5e8d5e8 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -405,6 +405,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Επιλογή χρονικής περιόδου', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 4c24586d..b2a7dfd1 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -443,6 +443,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'בחר תקופת זמן', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 50ba1b3e..f6bceaee 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -443,6 +443,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Jelölj meg egy időszakot', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 3a477742..fc8a0815 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -418,6 +418,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Seleziona il periodo di tempo', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 55b8ee09..7f83a767 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -449,6 +449,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => '時間期間の選択', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index d50f8170..aa40a094 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -447,6 +447,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => '시간 기간을 선택', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 8f495405..ee170cee 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -392,6 +392,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Kies periode', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 95bf5e2b..e43dad9b 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -447,6 +447,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Velg tidsperiode', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 2b63f06b..9b243eef 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -425,6 +425,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Wybierz okres', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 964c55d9..71fcef6f 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -420,6 +420,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Selecione o período de tempo', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index c51af296..0723acff 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -427,6 +427,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Selecione o período de tempo', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 2e1d2f27..b94bcd98 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -450,6 +450,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Alege perioada', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 77c90653..19bedf9b 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -384,6 +384,7 @@ $i18n_key_words = array( 'form.reports.include_not_invoiced' => 'не внесённые в счёт', 'form.reports.include_assigned' => 'присвоена', 'form.reports.include_not_assigned' => 'не присвоена', +'form.reports.include_pending' => 'в ожидании', 'form.reports.include_approved' => 'одобрена', 'form.reports.include_not_approved' => 'не одобрена', 'form.reports.select_period' => 'Выберите интервал времени', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index bd620200..d3525c0d 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -433,6 +433,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Vyberte časový rozsah', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 66992c49..fedc796a 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -424,6 +424,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', // 'form.reports.select_period' => 'Select time period', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 73966ca8..22910078 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -423,6 +423,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Odaberi vremenski raspon', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 410a64f5..480650e4 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -421,6 +421,7 @@ $i18n_key_words = array( // TODO: translate the following. // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Välj intervall', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e5387283..87b44ca0 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -460,6 +460,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => 'Zaman aralığını seç', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 4406831d..9d03e7b0 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -432,6 +432,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => '选择时间段', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 47d2cfbc..e488dbd6 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -440,6 +440,7 @@ $i18n_key_words = array( // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.include_assigned' => 'assigned', // 'form.reports.include_not_assigned' => 'not assigned', +// 'form.reports.include_pending' => 'pending', // 'form.reports.include_approved' => 'approved', // 'form.reports.include_not_approved' => 'not approved', 'form.reports.select_period' => '選擇時間段', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7bd15642..b8f56833 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.37.4760 | Copyright © Anuko | +  Anuko Time Tracker 1.18.37.4761 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/reports.php b/reports.php index 264e5645..f652027b 100644 --- a/reports.php +++ b/reports.php @@ -186,7 +186,11 @@ if ($showTimesheet) { $form->addInput(array('type'=>'combobox', 'name'=>'timesheet', 'style'=>'width: 250px;', - 'data'=>array('1'=>$i18n->get('form.reports.include_assigned'),'2'=>$i18n->get('form.reports.include_not_assigned')), + 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), + TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), + TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), + TIMESHEET_APPROVED=>$i18n->get('form.reports.include_approved'), + TIMESHEET_NOT_APPROVED=>$i18n->get('form.reports.include_not_approved')), 'empty'=>array(''=>$i18n->get('dropdown.all')) )); } -- 2.20.1