Fixed pdf reports to output paid status.
authorNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 19:14:05 +0000 (19:14 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 19:14:05 +0000 (19:14 +0000)
WEB-INF/templates/footer.tpl
topdf.php

index 9a14150..ea48a8a 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.15.3.3771 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.15.3.3772 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index b1195a4..f0fdb60 100644 (file)
--- a/topdf.php
+++ b/topdf.php
@@ -159,6 +159,7 @@ if ($totals_only) {
   if ($bean->getAttribute('chduration')) { $colspan++; $html .= "<td $styleCentered>".$i18n->getKey('label.duration').'</td>'; }
   if ($bean->getAttribute('chnote')) { $colspan++; $html .= '<td>'.$i18n->getKey('label.note').'</td>'; }
   if ($bean->getAttribute('chcost')) { $colspan++; $html .= "<td $styleCentered>".$i18n->getKey('label.cost').'</td>'; }
+  if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "<td $styleCentered>".$i18n->getKey('label.paid').'</td>'; }
   if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= '<td>'.$i18n->getKey('label.invoice').'</td>'; }
   $html .= '</tr>';
   $html .= '</thead>';
@@ -208,6 +209,7 @@ if ($totals_only) {
             $html .= $subtotals[$prev_grouped_by]['expenses'];
           $html .= '</td>';
         }
+        if ($bean->getAttribute('chpaid')) $html .= '<td></td>';
         if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
         $html .= '</tr>';
         $html .= '<tr><td colspan="'.$colspan.'">&nbsp;</td></tr>';
@@ -235,6 +237,11 @@ if ($totals_only) {
         $html .= $item['expense'];
       $html .= '</td>';
     }
+    if ($bean->getAttribute('chpaid')) {
+        $html .= '<td>';
+        $html .= $item['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no');
+        $html .= '</td>';
+    }
     if ($bean->getAttribute('chinvoice')) $html .= '<td>'.htmlspecialchars($item['invoice']).'</td>';
     $html .= '</tr>';
 
@@ -283,6 +290,7 @@ if ($totals_only) {
         $html .= $subtotals[$prev_grouped_by]['expenses'];
       $html .= '</td>';
     }
+    if ($bean->getAttribute('chpaid')) $html .= '<td></td>';
     if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
     $html .= '</tr>';
   }
@@ -308,6 +316,7 @@ if ($totals_only) {
       $html .= $totals['expenses'];
     $html .= '</td>';
   }
+  if ($bean->getAttribute('chpaid')) $html .= '<td></td>';
   if ($bean->getAttribute('chinvoice')) $html .= '<td></td>';
   $html .= '</tr>';
   $html .= '</table>';