projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduced audit fields for users.
[timetracker.git]
/
reports.php
diff --git
a/reports.php
b/reports.php
index
710de52
..
fe56001
100644
(file)
--- a/
reports.php
+++ b/
reports.php
@@
-37,7
+37,7
@@
import('ttFavReportHelper');
import('ttClientHelper');
// Access check.
import('ttClientHelper');
// Access check.
-if (!ttAccess
Check(right_view_reports
)) {
+if (!ttAccess
Allowed('view_own_reports'
)) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
@@
-122,7
+122,7
@@
$form->addInput(array('type'=>'combobox',
'data'=>$include_options,
'empty'=>array(''=>$i18n->getKey('dropdown.all'))));
'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'=>'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'));
}
$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 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');
// 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('chfinish', '1');
$form->setValueByElement('chnote', '1');
$form->setValueByElement('chcf_1', '0');
+ $form->setValueByElement('chpaid', '0');
$form->setValueByElement('chtotalsonly', '0');
}
$form->setValueByElement('chtotalsonly', '0');
}