X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tofile.php;h=d996098b71da7dba01d6bfb7d3d9d65fd5e1977c;hb=f9e704d00a2d21b1a94332e088f78c22da03d37c;hp=36bd7e1c9d4edd0b6d7493705b77787f0b3c605d;hpb=756657a71e251b65d8191636e33e5e4ea32767af;p=timetracker.git diff --git a/tofile.php b/tofile.php index 36bd7e1c..d996098b 100644 --- a/tofile.php +++ b/tofile.php @@ -60,7 +60,7 @@ $totals_only = $bean->getAttribute('chtotalsonly'); // Obtain items. $options = ttReportHelper::getReportOptions($bean); if ($totals_only) - $subtotals = ttReportHelper::getSubtotals($bean, $options); + $subtotals = ttReportHelper::getSubtotals($options); else $items = ttReportHelper::getItems($options); @@ -84,12 +84,12 @@ if ('xml' == $type) { print "\n"; print "\n"; - $group_by = $bean->getAttribute('group_by'); + $group_by1 = $bean->getAttribute('group_by1'); if ($totals_only) { // Totals only report. Print subtotals. foreach ($subtotals as $subtotal) { print "\n"; - print "\t<".$group_by.">\n"; + print "\t<".$group_by1.">\n"; if ($bean->getAttribute('chduration')) { $val = $subtotal['time']; if($val && defined('EXPORT_DECIMAL_DURATION') && isTrue(EXPORT_DECIMAL_DURATION)) @@ -161,17 +161,10 @@ if ('csv' == $type) { $bom = chr(239).chr(187).chr(191); // 0xEF 0xBB 0xBF in the beginning of the file is UTF8 BOM. print $bom; // Without this Excel does not display UTF8 characters properly. - $group_by = $bean->getAttribute('group_by'); + $group_by1 = $bean->getAttribute('group_by1'); if ($totals_only) { // Totals only report. - - // Determine group_by header. - if ('cf_1' == $group_by) - $group_by_header = $custom_fields->fields[0]['label']; - else { - $key = 'label.'.$group_by; - $group_by_header = $i18n->get($key); - } + $group_by_header = ttReportHelper::makeGroupByHeader($options); // Print headers. print '"'.$group_by_header.'"';