projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed monthly quotas for negative hours.
[timetracker.git]
/
report.php
diff --git
a/report.php
b/report.php
index
3bd410a
..
31cee67
100644
(file)
--- a/
report.php
+++ b/
report.php
@@
-27,17
+27,21
@@
// +----------------------------------------------------------------------+
require_once('initialize.php');
// +----------------------------------------------------------------------+
require_once('initialize.php');
+import('ttConfigHelper');
import('form.Form');
import('form.ActionForm');
import('ttReportHelper');
import('ttGroupHelper');
import('ttTimesheetHelper');
import('form.Form');
import('form.ActionForm');
import('ttReportHelper');
import('ttGroupHelper');
import('ttTimesheetHelper');
-// Access check.
+// Access check
s
.
if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports') || ttAccessAllowed('view_all_reports') || ttAccessAllowed('view_client_reports'))) {
header('Location: access_denied.php');
exit();
}
if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports') || ttAccessAllowed('view_all_reports') || ttAccessAllowed('view_client_reports'))) {
header('Location: access_denied.php');
exit();
}
+// End of access checks.
+
+$config = new ttConfigHelper($user->getConfig());
if ($user->isPluginEnabled('ap')) {
$cl_mark_approved_select_option = $request->getParameter('mark_approved_select_options', ($request->isPost() ? null : @$_SESSION['mark_approved_select_option']));
if ($user->isPluginEnabled('ap')) {
$cl_mark_approved_select_option = $request->getParameter('mark_approved_select_options', ($request->isPost() ? null : @$_SESSION['mark_approved_select_option']));
@@
-271,17
+275,16
@@
if ($request->isGet() && $use_checkboxes)
if (ttReportHelper::grouping($options)) {
$subtotals = ttReportHelper::getSubtotals($options);
$smarty->assign('group_by_header', ttReportHelper::makeGroupByHeader($options));
if (ttReportHelper::grouping($options)) {
$subtotals = ttReportHelper::getSubtotals($options);
$smarty->assign('group_by_header', ttReportHelper::makeGroupByHeader($options));
+ if ($report_items) {
+ // Assign variables that are used to print subtotals.
+ $smarty->assign('print_subtotals', true);
+ $smarty->assign('first_pass', true);
+ $smarty->assign('prev_grouped_by', '');
+ $smarty->assign('cur_grouped_by', '');
+ }
}
$totals = ttReportHelper::getTotals($options);
}
$totals = ttReportHelper::getTotals($options);
-// Assign variables that are used to print subtotals.
-if ($report_items) {
- $smarty->assign('print_subtotals', true);
- $smarty->assign('first_pass', true);
- $smarty->assign('prev_grouped_by', '');
- $smarty->assign('cur_grouped_by', '');
-}
-
// Determine column span for note field.
$colspan = 1;
if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++;
// Determine column span for note field.
$colspan = 1;
if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++;
@@
-309,6
+312,7
@@
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('report_items', $report_items);
$smarty->assign('subtotals', $subtotals);
$smarty->assign('totals', $totals);
$smarty->assign('report_items', $report_items);
$smarty->assign('subtotals', $subtotals);
$smarty->assign('totals', $totals);
+$smarty->assign('note_on_separate_row', $user->getConfigOption('report_note_on_separate_row'));
$smarty->assign('colspan', $colspan);
$smarty->assign('bean', $bean);
$smarty->assign('title', $i18n->get('title.report').": ".$totals['start_date']." - ".$totals['end_date']);
$smarty->assign('colspan', $colspan);
$smarty->assign('bean', $bean);
$smarty->assign('title', $i18n->get('title.report').": ".$totals['start_date']." - ".$totals['end_date']);