]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttReportHelper.class.php
Releasing Approval plugin for testing.
[timetracker.git] / WEB-INF / lib / ttReportHelper.class.php
index 57d0047288c39b4f2ef082e7d22f6c865e876053..80ead68ed083ab70c423d41b200e0ffa7f3b21f6 100644 (file)
@@ -1087,9 +1087,9 @@ class ttReportHelper {
     $options['invoice'] = $bean->getAttribute('invoice');
     $options['paid_status'] = $bean->getAttribute('paid_status');
     $options['approved'] = $bean->getAttribute('approved');
+    if ($user->isPluginEnabled('ap') && $user->isClient() && !$user->can('view_client_unapproved'))
+      $options['approved'] = 1; // Restrict clients to approved records only.
     $options['timesheet'] = $bean->getAttribute('timesheet');
-    if ($user->isPluginEnabled('ts') && $user->isClient() && !$user->can('view_client_unapproved'))
-      $options['timesheet'] = TIMESHEET_APPROVED; // Restrict clients to approved timesheet records only.
     if (is_array($bean->getAttribute('users'))) $options['users'] = join(',', $bean->getAttribute('users'));
     $options['period'] = $bean->getAttribute('period');
     $options['period_start'] = $bean->getAttribute('start_date');