[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14294] more on controller
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14294] more on controller |
Date: |
Sun, 08 Nov 2015 14:16:49 +0000 |
Revision: 14294
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14294
Author: sigurdne
Date: 2015-11-08 14:16:49 +0000 (Sun, 08 Nov 2015)
Log Message:
-----------
more on controller
Modified Paths:
--------------
trunk/controller/inc/class.uicomponent.inc.php
Modified: trunk/controller/inc/class.uicomponent.inc.php
===================================================================
--- trunk/controller/inc/class.uicomponent.inc.php 2015-11-08 14:16:27 UTC
(rev 14293)
+++ trunk/controller/inc/class.uicomponent.inc.php 2015-11-08 14:16:49 UTC
(rev 14294)
@@ -838,7 +838,7 @@
{
return array(
'components' => null,
- 'summary' =>
$this->get_summary($values),
+ 'summary' =>
$this->get_summary($values, $keep_only_assigned_to),
'location_filter' => $location_filter
);
}
@@ -1136,7 +1136,7 @@
return
"{$repeat_type}<br/>{$link}<br/>{$assigned_to}<br/>{$time}";
}
- private function get_summary($data)
+ private function get_summary($data, $keep_only_assigned_to)
{
@@ -1176,15 +1176,25 @@
);
+
+ $grand_total_count = 0;
+ $grand_total_billable_hours = 0;
+
foreach($data as $entry)
{
for ( $_month=1; $_month < 13; $_month++ )
{
+ if($keep_only_assigned_to &&
$keep_only_assigned_to != $entry[$_month]['info']['assigned_to'])
+ {
+ continue;
+ }
if(isset($entry[$_month]['status']))
{
$summary[$entry[$_month]['status']][$_month]['count'] +=1;
$summary[$entry[$_month]['status']][$_month]['billable_hours'] +=
$entry[$_month]['info']['billable_hours'];
+ $grand_total_count +=1;
+ $grand_total_billable_hours +=
$entry[$_month]['info']['billable_hours'];
}
}
@@ -1273,6 +1283,7 @@
Totalt
</td>
<td>
+ {$grand_total_count}</br>{$grand_total_billable_hours}
</td>
HTML;
foreach($fields as $field)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14294] more on controller,
Sigurd Nes <=