]> wagnertech.de Git - timetracker.git/commitdiff
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 454b437dfeacb8591052e5eb337a773f6223ddba..3940a51b73bf497d597ef56f08f9e9a77028e653 100644 (file)
@@ -1411,6 +1411,15 @@ class ttReportHelper {
     return $group_by_fields;
   }
 
     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;
   // 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 f2bf5b5e59c97dd254fffd945f13d5b4b6f2560a..be04ad9629d261e7a12d7e7f9fb6d016dff8f8a0 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
       <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>
             <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 5f7e687bf18013b55ef1e83665654472a7a7d98b..f6abcc4c6a691613a2ee8f65fc58f58631efda91 100644 (file)
@@ -178,7 +178,7 @@ $report_items = ttReportHelper::getItems($options);
 if ($request->isGet() && $user->isPluginEnabled('ps'))
   ttReportHelper::putInSession($report_items);
 
 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);
 
   $subtotals = ttReportHelper::getSubtotals($options);
 $totals = ttReportHelper::getTotals($options);