]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttReportHelper.class.php
Fixed a condition that determines grouping for getting subtotals.
[timetracker.git] / WEB-INF / lib / ttReportHelper.class.php
index 454b437dfeacb8591052e5eb337a773f6223ddba..3940a51b73bf497d597ef56f08f9e9a77028e653 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;