Fixed a condition that determines grouping for getting subtotals.
authorNik Okuntseff <support@anuko.com>
Wed, 31 Oct 2018 01:22:43 +0000 (01:22 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 31 Oct 2018 01:22:43 +0000 (01:22 +0000)
WEB-INF/lib/ttReportHelper.class.php
WEB-INF/templates/footer.tpl
report.php

index 454b437..3940a51 100644 (file)
@@ -1411,6 +1411,15 @@ class ttReportHelper {
     return $group_by_fields;
   }
 
+  // grouping determines if we are grooping the project by either group_by1,
+  // group_by2, or group_by3 values passed in $options.
+  static function grouping($options) {
+    $grouping = ($options['group_by1'] != null && $options['group_by1'] != 'no_grouping') ||
+      ($options['group_by2'] != null && $options['group_by2'] != 'no_grouping') ||
+      ($options['group_by3'] != null && $options['group_by3'] != 'no_grouping');
+    return $grouping;
+  }
+
   // groupingByUser determines if we are grouping a report by user.
   static function groupingByUser($options) {
     if ($options['group_by1'] == 'user' || $options['group_by2'] == 'user' || $options['group_by3'] == 'user') return true;
index f2bf5b5..be04ad9 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.18.03.4334 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.03.4335 | 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 5f7e687..f6abcc4 100644 (file)
@@ -178,7 +178,7 @@ $report_items = ttReportHelper::getItems($options);
 if ($request->isGet() && $user->isPluginEnabled('ps'))
   ttReportHelper::putInSession($report_items);
 
-if ('no_grouping' != $group_by)
+if (ttReportHelper::grouping($options))
   $subtotals = ttReportHelper::getSubtotals($options);
 $totals = ttReportHelper::getTotals($options);