[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10953] Property: budget handling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10953] Property: budget handling |
Date: |
Sun, 03 Mar 2013 20:37:49 +0000 |
Revision: 10953
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10953
Author: sigurdne
Date: 2013-03-03 20:37:49 +0000 (Sun, 03 Mar 2013)
Log Message:
-----------
Property: budget handling
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
trunk/property/inc/class.soworkorder.inc.php
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2013-03-03 19:44:03 UTC (rev
10952)
+++ trunk/property/inc/class.soproject.inc.php 2013-03-03 20:37:49 UTC (rev
10953)
@@ -731,6 +731,11 @@
$budget =
$this->get_budget($project['project_id']);
foreach($budget as $entry)
{
+ if($entry['active'])
+ {
+ $project['actual_cost']
+= $entry['actual_cost'];
+ }
+
if ($filter_year &&
$filter_year != 'all')
{
if($entry['year'] ==
$filter_year)
@@ -738,12 +743,10 @@
$project['combined_cost'] += $entry['sum_orders'];
$project['budget'] += $entry['budget'];
$project['obligation'] += $entry['sum_oblications'];
-
$project['actual_cost'] += $entry['actual_cost'];
}
}
else
{
- $project['actual_cost']
+= $entry['actual_cost'];
if($entry['active'])
{
$project['combined_cost'] += $entry['sum_orders'];
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2013-03-03 19:44:03 UTC
(rev 10952)
+++ trunk/property/inc/class.soworkorder.inc.php 2013-03-03 20:37:49 UTC
(rev 10953)
@@ -794,6 +794,11 @@
$order_budget =
$this->get_budget($workorder['workorder_id']);
foreach($order_budget as $entry)
{
+ if($entry['active'])
+ {
+ $workorder['actual_cost'] +=
$entry['actual_cost'];
+ }
+
if ($filter_year && $filter_year !=
'all')
{
if($entry['year'] ==
$filter_year)
@@ -801,12 +806,10 @@
$workorder['combined_cost'] += $entry['sum_orders'];
$workorder['budget'] +=
$entry['budget'];
$workorder['obligation'] += $entry['sum_oblications'];
-
$workorder['actual_cost'] += $entry['actual_cost'];
}
}
else
{
- $workorder['actual_cost'] +=
$entry['actual_cost'];
if($entry['active'])
{
$workorder['combined_cost'] += $entry['sum_orders'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10953] Property: budget handling,
Sigurd Nes <=