From: Nik Okuntseff Date: Sun, 10 Mar 2019 19:11:12 +0000 (+0000) Subject: Adjusted PDF reports to print notes on separate lines. X-Git-Tag: timetracker_1.19-1~181 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=46863f8e2310c275ec6d3b933d53717da711b05a;p=timetracker.git Adjusted PDF reports to print notes on separate lines. --- diff --git a/topdf.php b/topdf.php index 8e0738d4..4ede4cdd 100644 --- a/topdf.php +++ b/topdf.php @@ -154,7 +154,6 @@ if ($totals_only) { if ($bean->getAttribute('chfinish')) { $colspan++; $html .= "".$i18n->get('label.finish').''; } if ($bean->getAttribute('chduration')) { $colspan++; $html .= "".$i18n->get('label.duration').''; } if ($bean->getAttribute('chunits')) { $colspan++; $html .= "".$i18n->get('label.work_units_short').''; } - if ($bean->getAttribute('chnote')) { $colspan++; $html .= ''.$i18n->get('label.note').''; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "".$i18n->get('label.cost').''; } if ($bean->getAttribute('chapproved')) { $colspan++; $html .= "".$i18n->get('label.approved').''; } if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "".$i18n->get('label.paid').''; } @@ -201,7 +200,6 @@ if ($totals_only) { if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "".$subtotals[$prev_grouped_by]['time'].''; if ($bean->getAttribute('chunits')) $html .= "".$subtotals[$prev_grouped_by]['units'].''; - if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= ""; if ($user->can('manage_invoices') || $user->isClient()) @@ -233,7 +231,6 @@ if ($totals_only) { if ($bean->getAttribute('chfinish')) $html .= "".$item['finish'].''; if ($bean->getAttribute('chduration')) $html .= "".$item['duration'].''; if ($bean->getAttribute('chunits')) $html .= "".$item['units'].''; - if ($bean->getAttribute('chnote')) $html .= ''.htmlspecialchars($item['note']).''; if ($bean->getAttribute('chcost')) { $html .= ""; if ($user->can('manage_invoices') || $user->isClient()) @@ -261,6 +258,14 @@ if ($totals_only) { if ($bean->getAttribute('chtimesheet')) $html .= ''.htmlspecialchars($item['timesheet_name']).''; $html .= ''; + if ($bean->getAttribute('chnote') && $item['note']) { + $html .= ''; + $html .= "".$i18n->get('label.note').''; + $noteSpan = $colspan-1; + $html .= ''.htmlspecialchars($item['note']).''; + $html .= ''; + } + $prev_date = $item['date']; if ($print_subtotals) $prev_grouped_by = $item['grouped_by']; } @@ -298,7 +303,6 @@ if ($totals_only) { if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "".$subtotals[$prev_grouped_by]['time'].''; if ($bean->getAttribute('chunits')) $html .= "".$subtotals[$prev_grouped_by]['units'].''; - if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= ""; if ($user->can('manage_invoices') || $user->isClient()) @@ -328,7 +332,6 @@ if ($totals_only) { if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "".$totals['time'].''; if ($bean->getAttribute('chunits')) $html .= "".$totals['units'].''; - if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "".htmlspecialchars($user->currency).' '; if ($user->can('manage_invoices') || $user->isClient())