From e171b4e97c8dd9322362d88d6722551f7c44f6cf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 20 Jul 2018 18:44:26 +0000 Subject: [PATCH] Fixed export to PDF to include work units. --- WEB-INF/templates/footer.tpl | 2 +- topdf.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3d617784..d7c29536 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- "; $html .= ''; if ($bean->getAttribute('chduration')) { $colspan++; $html .= "'; } + if ($bean->getAttribute('chunits')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "'; } $html .= ''; $html .= ''; @@ -117,6 +118,7 @@ if ($totals_only) { $html .= ''; $html .= ''; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chcost')) { $html .= ""; $html .= ''; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chcost')) { $html .= "'; } if ($bean->getAttribute('chfinish')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chduration')) { $colspan++; $html .= "'; } + if ($bean->getAttribute('chunits')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chnote')) { $colspan++; $html .= ''; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "'; } @@ -202,6 +206,7 @@ if ($totals_only) { if ($bean->getAttribute('chstart')) $html .= ''; if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($bean->getAttribute('chfinish')) $html .= "'; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($bean->getAttribute('chfinish')) $html .= ''; if ($bean->getAttribute('chduration')) $html .= "'; + if ($bean->getAttribute('chunits')) $html .= "'; if ($bean->getAttribute('chnote')) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "
 Anuko Time Tracker 1.17.92.4278 | Copyright © Anuko | +  Anuko Time Tracker 1.17.92.4279 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/topdf.php b/topdf.php index eb09bc45..b7ac19d5 100644 --- a/topdf.php +++ b/topdf.php @@ -109,6 +109,7 @@ if ($totals_only) { $html .= "
'.htmlspecialchars($group_by_header).'".$i18n->get('label.duration').'".$i18n->get('label.work_units_short').'".$i18n->get('label.cost').'
'.htmlspecialchars($subtotal['name']).'".$subtotal['time'].'".$subtotal['units'].'"; if ($user->can('manage_invoices') || $user->isClient()) @@ -132,6 +134,7 @@ if ($totals_only) { $html .= "
'.$i18n->get('label.total').'".$totals['time'].'".$totals['units'].'"; $html .= htmlspecialchars($user->currency).' '; @@ -158,6 +161,7 @@ if ($totals_only) { if ($bean->getAttribute('chstart')) { $colspan++; $html .= "".$i18n->get('label.start').'".$i18n->get('label.finish').'".$i18n->get('label.duration').'".$i18n->get('label.work_units_short').''.$i18n->get('label.note').'".$i18n->get('label.cost').'".$i18n->get('label.paid').'".$subtotals[$prev_grouped_by]['time'].'".$subtotals[$prev_grouped_by]['units'].'"; @@ -231,6 +236,7 @@ if ($totals_only) { if ($bean->getAttribute('chstart')) $html .= "".$item['start'].'".$item['finish'].'".$item['duration'].'".$item['units'].''.htmlspecialchars($item['note']).'"; @@ -289,6 +295,7 @@ if ($totals_only) { if ($bean->getAttribute('chstart')) $html .= '".$subtotals[$prev_grouped_by]['time'].'".$subtotals[$prev_grouped_by]['units'].'"; @@ -316,6 +323,7 @@ if ($totals_only) { if ($bean->getAttribute('chstart')) $html .= '".$totals['time'].'".$totals['units'].'".htmlspecialchars($user->currency).' '; -- 2.20.1