Added paid value to csv and xml exports.
authorNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 17:20:57 +0000 (17:20 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 17:20:57 +0000 (17:20 +0000)
WEB-INF/templates/footer.tpl
tofile.php

index 9820f54..9f017e6 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.2.3766 | 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.2.3767 | 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 c7f81e5..6849b7f 100644 (file)
@@ -53,7 +53,7 @@ $bean = new ActionForm('reportBean', new Form('reportForm'), $request);
 $type = $request->getParameter('type');
 
 // Also, there are 2 variations of report: totals only, or normal. Totals only means that the report
-// is grouped by (either date, user, client, project, task or cf_1) and user only needs to see subtotals by group.
+// is grouped by (either date, user, client, project, task, or cf_1) and user only needs to see subtotals by group.
 $totals_only = $bean->getAttribute('chtotalsonly');
 
 // Obtain items.
@@ -132,6 +132,7 @@ if ('xml' == $type) {
           print $item['expense'];
         print "]]></cost>\n";
       }
+      if ($bean->getAttribute('chpaid')) print "\t<paid><![CDATA[".$item['paid']."]]></paid>\n";
       if ($bean->getAttribute('chinvoice')) print "\t<invoice><![CDATA[".$item['invoice']."]]></invoice>\n";
 
       print "</row>\n";
@@ -198,6 +199,7 @@ if ('csv' == $type) {
     if ($bean->getAttribute('chduration')) print ',"'.$i18n->getKey('label.duration').'"';
     if ($bean->getAttribute('chnote')) print ',"'.$i18n->getKey('label.note').'"';
     if ($bean->getAttribute('chcost')) print ',"'.$i18n->getKey('label.cost').'"';
+    if ($bean->getAttribute('chpaid')) print ',"'.$i18n->getKey('label.paid').'"';
     if ($bean->getAttribute('chinvoice')) print ',"'.$i18n->getKey('label.invoice').'"';
     print "\n";
 
@@ -224,6 +226,7 @@ if ('csv' == $type) {
         else
           print ',"'.$item['expense'].'"';
       }
+      if ($bean->getAttribute('chpaid')) print ',"'.$item['paid'].'"';
       if ($bean->getAttribute('chinvoice')) print ',"'.str_replace('"','""',$item['invoice']).'"';
       print "\n";
     }