projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bit of refactoring.
[timetracker.git]
/
report.php
diff --git
a/report.php
b/report.php
index
1423706
..
efbacce
100644
(file)
--- a/
report.php
+++ b/
report.php
@@
-69,7
+69,7
@@
$client_id = $bean->getAttribute('client');
// Do we need to show checkboxes?
if ($bean->getAttribute('chpaid') ||
// Do we need to show checkboxes?
if ($bean->getAttribute('chpaid') ||
- ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by')) && !$user->isClient())) {
+ ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by
1
')) && !$user->isClient())) {
if ($user->can('manage_invoices'))
$smarty->assign('use_checkboxes', true);
}
if ($user->can('manage_invoices'))
$smarty->assign('use_checkboxes', true);
}
@@
-92,7
+92,7
@@
if ($user->can('manage_invoices') && $bean->getAttribute('chpaid')) {
// Controls for "Assign to invoice" block.
if ($user->can('manage_invoices') &&
// Controls for "Assign to invoice" block.
if ($user->can('manage_invoices') &&
- ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by')) && !$user->isClient())) {
+ ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by
1
')) && !$user->isClient())) {
// Client is selected and we are displaying the invoice column.
$recent_invoices = ttTeamHelper::getRecentInvoices($user->group_id, $client_id);
if ($recent_invoices) {
// Client is selected and we are displaying the invoice column.
$recent_invoices = ttTeamHelper::getRecentInvoices($user->group_id, $client_id);
if ($recent_invoices) {
@@
-170,7
+170,7
@@
if ($request->isPost()) {
}
} // isPost
}
} // isPost
-$group_by = $bean->getAttribute('group_by');
+$group_by = $bean->getAttribute('group_by
1
');
$options = ttReportHelper::getReportOptions($bean);
$report_items = ttReportHelper::getItems($options);
$options = ttReportHelper::getReportOptions($bean);
$report_items = ttReportHelper::getItems($options);
@@
-179,14
+179,14
@@
if ($request->isGet() && $user->isPluginEnabled('ps'))
ttReportHelper::putInSession($report_items);
if ('no_grouping' != $group_by)
ttReportHelper::putInSession($report_items);
if ('no_grouping' != $group_by)
- $subtotals = ttReportHelper::getSubtotals($
bean, $
options);
-$totals = ttReportHelper::getTotals($
bean, $
options);
+ $subtotals = ttReportHelper::getSubtotals($options);
+$totals = ttReportHelper::getTotals($options);
// Assign variables that are used to print subtotals.
// Assign variables that are used to print subtotals.
-if ($report_items && 'no_grouping' != $group_by) {
+if ($report_items && 'no_grouping' != $group_by
1
) {
$smarty->assign('print_subtotals', true);
$smarty->assign('first_pass', true);
$smarty->assign('print_subtotals', true);
$smarty->assign('first_pass', true);
- $smarty->assign('group_by
', $group_by
);
+ $smarty->assign('group_by
1', $group_by1
);
$smarty->assign('prev_grouped_by', '');
$smarty->assign('cur_grouped_by', '');
}
$smarty->assign('prev_grouped_by', '');
$smarty->assign('cur_grouped_by', '');
}