X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=topdf.php;h=68a1eb5c376b19ca7d389f6c748ce6b4577974ac;hb=f81ad45ed1f9178834ff56f4a3a2ee0839a43dd9;hp=b1195a4b93e9772d692b0605c2c15cfac5cb6a18;hpb=4adddb2df36c69f06192807b82d48d7d282605d3;p=timetracker.git diff --git a/topdf.php b/topdf.php index b1195a4b..68a1eb5c 100644 --- a/topdf.php +++ b/topdf.php @@ -35,6 +35,12 @@ import('form.Form'); import('form.ActionForm'); import('ttReportHelper'); +// Access check. +if (!ttAccessAllowed('view_own_reports')) { + header('Location: access_denied.php'); + exit(); +} + // Check whether TCPDF library is available. if (!file_exists('WEB-INF/lib/tcpdf/')) die('TCPDF library is not found in WEB-INF/lib/tcpdf/'); @@ -42,12 +48,6 @@ if (!file_exists('WEB-INF/lib/tcpdf/')) // Include TCPDF library. require_once('WEB-INF/lib/tcpdf/tcpdf.php'); -// Access check. -if (!ttAccessCheck(right_view_reports)) { - header('Location: access_denied.php'); - exit(); -} - // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); @@ -159,6 +159,8 @@ if ($totals_only) { if ($bean->getAttribute('chduration')) { $colspan++; $html .= "".$i18n->getKey('label.duration').''; } if ($bean->getAttribute('chnote')) { $colspan++; $html .= ''.$i18n->getKey('label.note').''; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "".$i18n->getKey('label.cost').''; } + if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "".$i18n->getKey('label.paid').''; } + if ($bean->getAttribute('chip')) { $colspan++; $html .= "".$i18n->getKey('label.ip').''; } if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= ''.$i18n->getKey('label.invoice').''; } $html .= ''; $html .= ''; @@ -208,6 +210,8 @@ if ($totals_only) { $html .= $subtotals[$prev_grouped_by]['expenses']; $html .= ''; } + if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= ' '; @@ -235,6 +239,16 @@ if ($totals_only) { $html .= $item['expense']; $html .= ''; } + if ($bean->getAttribute('chpaid')) { + $html .= ''; + $html .= $item['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no'); + $html .= ''; + } + if ($bean->getAttribute('chip')) { + $html .= ''; + $html .= $item['modified'] ? $item['modified_ip'].' '.$item['modified'] : $item['created_ip'].' '.$item['created']; + $html .= ''; + } if ($bean->getAttribute('chinvoice')) $html .= ''.htmlspecialchars($item['invoice']).''; $html .= ''; @@ -283,6 +297,8 @@ if ($totals_only) { $html .= $subtotals[$prev_grouped_by]['expenses']; $html .= ''; } + if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; } @@ -308,6 +324,8 @@ if ($totals_only) { $html .= $totals['expenses']; $html .= ''; } + if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= '';