From: Nik Okuntseff Date: Sat, 23 Feb 2019 15:10:00 +0000 (+0000) Subject: Fixed report filter by timesheet assignment. X-Git-Tag: timetracker_1.19-1~290 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0f3dceb9c5fd515d2e1bd39a480345d71ad6a113;p=timetracker.git Fixed report filter by timesheet assignment. --- diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 6b84f4c7..c96f0f4d 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -60,8 +60,10 @@ class ttReportHelper { if ($options['task_id']) $dropdown_parts .= ' and l.task_id = '.$options['task_id']; if ($options['billable']=='1') $dropdown_parts .= ' and l.billable = 1'; 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['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['paid_status']=='1') $dropdown_parts .= ' and l.paid = 1'; if ($options['paid_status']=='2') $dropdown_parts .= ' and l.paid = 0'; @@ -108,8 +110,10 @@ class ttReportHelper { elseif ($user->isClient() && $user->client_id) $dropdown_parts .= ' and ei.client_id = '.$user->client_id; 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['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['paid_status']=='1') $dropdown_parts .= ' and ei.paid = 1'; if ($options['paid_status']=='2') $dropdown_parts .= ' and ei.paid = 0'; @@ -995,6 +999,7 @@ class ttReportHelper { $options['billable'] = $bean->getAttribute('include_records'); $options['invoice'] = $bean->getAttribute('invoice'); $options['paid_status'] = $bean->getAttribute('paid_status'); + $options['timesheet'] = $bean->getAttribute('timesheet'); if (is_array($bean->getAttribute('users'))) $options['users'] = join(',', $bean->getAttribute('users')); $options['period'] = $bean->getAttribute('period'); $options['period_start'] = $bean->getAttribute('start_date'); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 951bba17..22f28353 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.37.4757 | Copyright © Anuko | +  Anuko Time Tracker 1.18.37.4758 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}