[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11007] property: listing budget at project list
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11007] property: listing budget at project list |
Date: |
Wed, 20 Mar 2013 08:54:15 +0000 |
Revision: 11007
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11007
Author: sigurdne
Date: 2013-03-20 08:54:14 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
property: listing budget at project list
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2013-03-20 07:32:42 UTC (rev
11006)
+++ trunk/property/inc/class.soproject.inc.php 2013-03-20 08:54:14 UTC (rev
11007)
@@ -757,6 +757,40 @@
}
else
{
+
+ $year = (int)$filter_year;
+ $project_budget =
$this->get_budget($project['project_id']);
+ foreach ($project_budget as
$entry)
+ {
+ if($year &&
$entry['year'] == $year)
+ {
+
$project['combined_cost'] += $entry['sum_orders'];
+
if($entry['active'])
+ {
+
$project['budget'] += $entry['budget'];
+
if(!$entry['closed'])
+ {
+
$project['obligation'] += $entry['sum_oblications'];
+ }
+ }
+
$project['actual_cost'] += $entry['actual_cost'];
+ }
+ else if (!$year)
+ {
+
$project['combined_cost'] += $entry['sum_orders'];
+
if($entry['active'])
+ {
+
$project['budget'] += $entry['budget'];
+
if(!$entry['closed'])
+ {
+
$project['obligation'] += $entry['sum_oblications'];
+ }
+ }
+
$project['actual_cost'] += $entry['actual_cost'];
+ }
+ }
+/*
+
$workorder_data =
$this->project_workorder_data(array('project_id' => $project['project_id'],
'year' => (int)$filter_year));
foreach($workorder_data as
$entry)
{
@@ -765,9 +799,13 @@
$project['budget']
+= $entry['budget'];
$project['obligation']
+= $entry['obligation'];
}
+
unset($entry);
+*/
$_diff_start =
abs($project['budget']) > 0 ? $project['budget'] : $project['combined_cost'];
$project['diff'] = $_diff_start
- $project['obligation'] - $project['actual_cost'];
+
+
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11007] property: listing budget at project list,
Sigurd Nes <=