projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed an unused string.
[timetracker.git]
/
topdf.php
diff --git
a/topdf.php
b/topdf.php
index
3f0a6dc
..
d017299
100644
(file)
--- a/
topdf.php
+++ b/
topdf.php
@@
-49,7
+49,7
@@
if (!ttAccessCheck(right_view_reports)) {
}
// Use custom fields plugin if it is enabled.
}
// 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);
}
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 .= '<td>'.$i18n->getKey('label.invoice').'</td>'; }
$html .= '</tr>';
$html .= '</thead>';
if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= '<td>'.$i18n->getKey('label.invoice').'</td>'; }
$html .= '</tr>';
$html .= '</thead>';
-
+
foreach ($items as $item) {
// Print a subtotal for a block of grouped values.
$cur_date = $item['date'];
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 .= '<td>'.htmlspecialchars($item['invoice']).'</td>';
$html .= '</tr>';
}
if ($bean->getAttribute('chinvoice')) $html .= '<td>'.htmlspecialchars($item['invoice']).'</td>';
$html .= '</tr>';
-
+
$prev_date = $item['date'];
if ($print_subtotals) $prev_grouped_by = $item['grouped_by'];
}
$prev_date = $item['date'];
if ($print_subtotals) $prev_grouped_by = $item['grouped_by'];
}
-
+
// Print a terminating subtotal.
if ($print_subtotals) {
$html .= '<tr style="background-color:#e0e0e0;">';
// Print a terminating subtotal.
if ($print_subtotals) {
$html .= '<tr style="background-color:#e0e0e0;">';
@@
-283,7
+283,7
@@
if ($totals_only) {
if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
$html .= '</tr>';
}
if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
$html .= '</tr>';
}
-
+
// Print totals.
$html .= '<tr><td colspan="'.$colspan.'"> </td></tr>';
$html .= '<tr style="background-color:#e0e0e0;">';
// Print totals.
$html .= '<tr><td colspan="'.$colspan.'"> </td></tr>';
$html .= '<tr style="background-color:#e0e0e0;">';
@@
-302,7
+302,7
@@
if ($totals_only) {
if ($user->canManageTeam() || $user->isClient())
$html .= $totals['cost'];
else
if ($user->canManageTeam() || $user->isClient())
$html .= $totals['cost'];
else
- $html .= $totals['expenses'];
+ $html .= $totals['expenses'];
$html .= '</td>';
}
if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
$html .= '</td>';
}
if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
@@
-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.
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;
}
// 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;
}
// 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.
// Page header.
public function Header() {
// Print logo, which is the only element of our custom header.