X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=reports.php;h=27a722446f1ab3a010f0a13dd11345d08c52e122;hb=ad98b13400fdc2fa2299a22c9bd54c4cd27960c3;hp=710de524691e4afd0cfa93dbd76d6d8746a4def8;hpb=704d09fab8234dda51765058b15393f6c68191f3;p=timetracker.git diff --git a/reports.php b/reports.php index 710de524..27a72244 100644 --- a/reports.php +++ b/reports.php @@ -122,7 +122,7 @@ $form->addInput(array('type'=>'combobox', '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;', @@ -197,12 +197,12 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type } $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'); @@ -247,6 +247,7 @@ if ($request->isGet() && !$bean->isSaved()) { $form->setValueByElement('chfinish', '1'); $form->setValueByElement('chnote', '1'); $form->setValueByElement('chcf_1', '0'); + $form->setValueByElement('chpaid', '0'); $form->setValueByElement('chtotalsonly', '0'); }