'data'=>$include_options,
'empty'=>array(''=>$i18n->getKey('dropdown.all'))));
-if ($user->isPluginEnabled('ps')) {
+if ($user->canManageTeam() && $user->isPluginEnabled('ps')) {
$form->addInput(array('type'=>'combobox',
'name'=>'paid_status',
'style'=>'width: 250px;',
}
$form->addInput(array('type'=>'checkbox','name'=>'chduration'));
$form->addInput(array('type'=>'checkbox','name'=>'chnote'));
-if (defined('COST_ON_REPORTS') && isTrue(COST_ON_REPORTS))
- $form->addInput(array('type'=>'checkbox','name'=>'chcost'));
+$form->addInput(array('type'=>'checkbox','name'=>'chcost'));
// If we have a custom field - add a checkbox for it.
if ($custom_fields && $custom_fields->fields[0])
$form->addInput(array('type'=>'checkbox','name'=>'chcf_1'));
-
+if ($user->canManageTeam() && $user->isPluginEnabled('ps'))
+ $form->addInput(array('type'=>'checkbox','name'=>'chpaid'));
// Add group by control.
$group_by_options['no_grouping'] = $i18n->getKey('form.reports.group_by_no');
$group_by_options['date'] = $i18n->getKey('form.reports.group_by_date');
$bean = new ActionForm('reportBean', $form, $request);
// At this point form values are obtained from session if they are there.
-if (($request->getMethod() == 'GET') && !$bean->isSaved()) {
+if ($request->isGet() && !$bean->isSaved()) {
// No previous form data were found in session. Use the following default values.
$form->setValueByElement('users', array_keys($user_list));
$period = new Period(INTERVAL_THIS_MONTH, new DateAndTime($user->date_format));
$form->setValueByElement('chfinish', '1');
$form->setValueByElement('chnote', '1');
$form->setValueByElement('chcf_1', '0');
+ $form->setValueByElement('chpaid', '0');
$form->setValueByElement('chtotalsonly', '0');
}