X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=report.php;h=620064afb3b546568ac044f1b2f8e7e7cf58e8b9;hb=336dbb39dfa588646615c461e3f16b785998ea67;hp=4a29c320b27bee10521d47d09a3795a49cb16d9e;hpb=d5923832a32b1f43cbc6c5d74bbd064888761c80;p=timetracker.git diff --git a/report.php b/report.php index 4a29c320..620064af 100644 --- a/report.php +++ b/report.php @@ -282,6 +282,24 @@ if ($report_items) { $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++; +if ($bean->getAttribute('chclient')) $colspan++; +if ($bean->getAttribute('chproject')) $colspan++; +if ($bean->getAttribute('chtask')) $colspan++; +if ($bean->getAttribute('chcf_1')) $colspan++; +if ($bean->getAttribute('chstart')) $colspan++; +if ($bean->getAttribute('chfinish')) $colspan++; +if ($bean->getAttribute('chduration')) $colspan++; +if ($bean->getAttribute('chunits')) $colspan++; +if ($bean->getAttribute('chcost')) $colspan++; +if ($bean->getAttribute('chapproved')) $colspan++; +if ($bean->getAttribute('chpaid')) $colspan++; +if ($bean->getAttribute('chip')) $colspan++; +if ($bean->getAttribute('chinvoice')) $colspan++; +if ($bean->getAttribute('chtimesheet')) $colspan++; + // Assign variables that are used to alternate color of rows for different dates. $smarty->assign('prev_date', ''); $smarty->assign('cur_date', ''); @@ -290,6 +308,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('colspan', $colspan); $smarty->assign('bean', $bean); $smarty->assign('title', $i18n->get('title.report').": ".$totals['start_date']." - ".$totals['end_date']); $smarty->assign('content_page_name', 'report.tpl');