X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttReportHelper.class.php;h=b894b037d8978f59aba61667fb40cee861582a23;hb=3c5c333f6d7a4a3f54fb711547dbd48403912c3a;hp=223d8e4b1bcdd7a163d02bb8b8ffadf003a4bdfc;hpb=2cb68f81bd4dd4f4a83afc87bbc292df6b7d7039;p=timetracker.git diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 223d8e4b..b894b037 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -291,6 +291,13 @@ class ttReportHelper { // Add paid status. if ($canViewReports && $bean->getAttribute('chpaid')) array_push($fields, 'l.paid as paid'); + // Add IP address. + if ($canViewReports && $bean->getAttribute('chip')) { + array_push($fields, 'l.created as created'); + array_push($fields, 'l.created_ip as created_ip'); + array_push($fields, 'l.modified as modified'); + array_push($fields, 'l.modified_ip as modified_ip'); + } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $bean->getAttribute('chinvoice')) @@ -361,6 +368,14 @@ class ttReportHelper { // Add paid status. if ($canViewReports && $bean->getAttribute('chpaid')) array_push($fields, 'ei.paid as paid'); + // Add IP address. + if ($canViewReports && $bean->getAttribute('chip')) { + array_push($fields, 'ei.created as created'); + array_push($fields, 'ei.created_ip as created_ip'); + array_push($fields, 'ei.modified as modified'); + array_push($fields, 'ei.modified_ip as modified_ip'); + } + // Add invoice name if it is selected. if (($canViewReports || $isClient) && $bean->getAttribute('chinvoice')) array_push($fields, 'i.name as invoice'); @@ -538,6 +553,16 @@ class ttReportHelper { array_push($fields, "cast(l.billable * coalesce(upb.rate, 0) * time_to_sec(l.duration)/3600 as decimal(10,2)) as cost"); // Use project rate for user. array_push($fields, "null as expense"); } + // Add paid status. + if ($canViewReports && $report['show_paid']) + array_push($fields, 'l.paid as paid'); + // Add IP address. + if ($canViewReports && $report['show_ip']) { + array_push($fields, 'l.created as created'); + array_push($fields, 'l.created_ip as created_ip'); + array_push($fields, 'l.modified as modified'); + array_push($fields, 'l.modified_ip as modified_ip'); + } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $report['show_invoice']) array_push($fields, 'i.name as invoice'); @@ -604,6 +629,16 @@ class ttReportHelper { array_push($fields, 'ei.name as note'); array_push($fields, 'ei.cost as cost'); array_push($fields, 'ei.cost as expense'); + // Add paid status. + if ($canViewReports && $report['show_paid']) + array_push($fields, 'ei.paid as paid'); + // Add IP address. + if ($canViewReports && $report['show_ip']) { + array_push($fields, 'ei.created as created'); + array_push($fields, 'ei.created_ip as created_ip'); + array_push($fields, 'ei.modified as modified'); + array_push($fields, 'ei.modified_ip as modified_ip'); + } // Add invoice name if it is selected. if (($canViewReports || $isClient) && $report['show_invoice']) array_push($fields, 'i.name as invoice'); @@ -1153,7 +1188,7 @@ class ttReportHelper { $body .= '
'; // Output title. - $body .= ''.$i18n->getKey('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'
'; + $body .= ''.$i18n->get('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'
'; // Output comment. if ($comment) $body .= ''.htmlspecialchars($comment).'
'; @@ -1166,16 +1201,16 @@ class ttReportHelper { $group_by_header = htmlspecialchars($custom_fields->fields[0]['label']); else { $key = 'label.'.$group_by; - $group_by_header = $i18n->getKey($key); + $group_by_header = $i18n->get($key); } $body .= ''.$group_by_header.' | '; if ($bean->getAttribute('chduration')) - $body .= ''.$i18n->getKey('label.duration').' | '; + $body .= ''.$i18n->get('label.duration').' | '; if ($bean->getAttribute('chcost')) - $body .= ''.$i18n->getKey('label.cost').' | '; + $body .= ''.$i18n->get('label.cost').' | '; $body .= '|||||||||||||||||||||||||||||||||||||||||||||||||||
'.$i18n->getKey('label.total').' | '; + $body .= ''.$i18n->get('label.total').' | '; if ($bean->getAttribute('chduration')) { $body .= '';
if ($totals['time'] <> '0:00') $body .= $totals['time'];
@@ -1216,31 +1251,33 @@ class ttReportHelper {
// Print table header.
$body .= '
|