X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=topdf.php;h=d017299b7ccb5f424afd6ae3f886576518e688a4;hb=a07b6f8bccda226991ced6fe25f1c9c508e423e5;hp=3f0a6dc758ca910b75446b37cd11ff8cc530b9ce;hpb=029e1daa627ad332edd64bba79f5415fcaf1407d;p=timetracker.git diff --git a/topdf.php b/topdf.php index 3f0a6dc7..d017299b 100644 --- a/topdf.php +++ b/topdf.php @@ -49,7 +49,7 @@ if (!ttAccessCheck(right_view_reports)) { } // Use custom fields plugin if it is enabled. -if (in_array('cf', explode(',', $user->plugins))) { +if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); $custom_fields = new CustomFields($user->team_id); } @@ -159,7 +159,7 @@ if ($totals_only) { if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= ''.$i18n->getKey('label.invoice').''; } $html .= ''; $html .= ''; - + foreach ($items as $item) { // Print a subtotal for a block of grouped values. $cur_date = $item['date']; @@ -234,11 +234,11 @@ if ($totals_only) { } if ($bean->getAttribute('chinvoice')) $html .= ''.htmlspecialchars($item['invoice']).''; $html .= ''; - + $prev_date = $item['date']; if ($print_subtotals) $prev_grouped_by = $item['grouped_by']; } - + // Print a terminating subtotal. if ($print_subtotals) { $html .= ''; @@ -283,7 +283,7 @@ if ($totals_only) { if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; } - + // Print totals. $html .= ' '; $html .= ''; @@ -302,7 +302,7 @@ if ($totals_only) { if ($user->canManageTeam() || $user->isClient()) $html .= $totals['cost']; else - $html .= $totals['expenses']; + $html .= $totals['expenses']; $html .= ''; } if ($bean->getAttribute('chinvoice')) $html .= ''; @@ -337,17 +337,17 @@ class ttPDF extends TCPDF { public $image_file = 'images/tt_logo.png'; // Image file for the logo in header. public $page_word = 'Page'; // Localized "Page" word in footer, ex: Page 1/2. - + // SetImageFile - sets image file name. public function SetImageFile($imgFile) { $this->image_file = $imgFile; } - + // SetPageWord - sets page word for footer. public function SetPageWord($pageWord) { $this->page_word = $pageWord; } - + // Page header. public function Header() { // Print logo, which is the only element of our custom header.