$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');
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.43.4778 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.44.4779 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<td align="right" nowrap>{$forms.pluginsForm.work_units.control}</td>
<td><label for="work_units">{$i18n.label.work_units}</label> <span id="work_units_config"><a href="work_units.php">{$i18n.label.configure}</a></span></td>
</tr>
-{if isTrue('APPROVAL_DEBUG')}
<tr>
<td align="right" nowrap>{$forms.pluginsForm.approval.control}</td>
<td><label for="approval">{$i18n.label.approval}</label></td>
</tr>
-{/if}
{if isTrue('TIMESHEET_DEBUG')}
<tr>
<td align="right" nowrap>{$forms.pluginsForm.timesheets.control}</td>
));
}
+// Add approved / not approved selector.
+$showApproved = $user->isPluginEnabled('ap') &&
+ ($user->can('view_own_reports') || $user->can('view_reports') ||
+ $user->can('view_all_reports') || ($user->can('view_client_reports') && $user->can('view_client_unapproved')));
+if ($showApproved) {
+ $form->addInput(array('type'=>'combobox',
+ 'name'=>'approved',
+ 'style'=>'width: 250px;',
+ 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')),
+ 'empty'=>array(''=>$i18n->get('dropdown.all'))
+ ));
+}
+
// Add timesheet assignment selector.
$showTimesheetDropdown = $user->isPluginEnabled('ts') &&
($user->can('view_own_timesheets') || $user->can('view_timesheets') ||
($user->can('view_own_timesheets') || $user->can('view_timesheets') ||
$user->can('view_all_timesheets') || $user->can('view_client_timesheets'));
-// Add approved / not approved selector.
-$showApproved = $user->isPluginEnabled('ap') &&
- ($user->can('view_own_reports') || $user->can('view_reports') ||
- $user->can('view_all_reports') || ($user->can('view_client_reports') && $user->can('view_client_unapproved')));
-if ($showApproved) {
- $form->addInput(array('type'=>'combobox',
- 'name'=>'approved',
- 'style'=>'width: 250px;',
- 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')),
- 'empty'=>array(''=>$i18n->get('dropdown.all'))
- ));
-}
-
// Add user table.
$showUsers = $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient();
$user_list = array();