[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11017] property: budget handling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11017] property: budget handling |
Date: |
Thu, 28 Mar 2013 19:35:37 +0000 |
Revision: 11017
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11017
Author: sigurdne
Date: 2013-03-28 19:35:35 +0000 (Thu, 28 Mar 2013)
Log Message:
-----------
property: budget handling
Modified Paths:
--------------
trunk/property/inc/class.sobudget.inc.php
Modified: trunk/property/inc/class.sobudget.inc.php
===================================================================
--- trunk/property/inc/class.sobudget.inc.php 2013-03-28 17:02:12 UTC (rev
11016)
+++ trunk/property/inc/class.sobudget.inc.php 2013-03-28 19:35:35 UTC (rev
11017)
@@ -611,7 +611,7 @@
if ($grouping > 0)
{
- $filtermethod .= " $where
fm_b_account.category='$grouping' ";
+ $filtermethod .= " $where
fm_b_account.category='{$grouping}' ";
$where = 'AND';
}
@@ -704,6 +704,8 @@
foreach ($_temp_paid_info as $order_id => &$order_info)
{
$order_budget =
$soworkorder->get_budget($order_id);
+//_debug_array($order_budget);
+ $_count = false;
foreach($order_budget as $budget)
{
if($budget['year'] == $year)
@@ -713,33 +715,31 @@
$projects3[$projects2[$order_id]]['budget']+= $budget['budget'];
$projects3[$projects2[$order_id]]['obligation']+= $budget['sum_oblications'];
- $order_info['actual_cost']
+= $budget['actual_cost'];
- $order_info['combined_cost']
+= $budget['sum_orders'];
- $order_info['budget']
+= $budget['budget'];
- $order_info['obligation']
+= $budget['sum_oblications'];
+ // $order_info['actual_cost']
= $budget['actual_cost'];
+ // $order_info['combined_cost']
= $budget['sum_orders'];
+ // $order_info['budget']
= $budget['budget'];
+ // $order_info['obligation']
= $budget['sum_oblications'];
$sum_obligation_cost +=
$budget['sum_oblications'];
$obligations[$order_info['b_account']][$order_info['district_id']][$order_info['ecodimb']]
+= $budget['sum_oblications'];
-
$_taxfactor = 1 +
($_taxcode[(int)$order_info['mva']]/100);
- $_actual_cost =
round($order_info['actual_cost']/$_taxfactor);
+ $_actual_cost =
round($budget['actual_cost']/$_taxfactor);
//_debug_array($_test);
$sum_actual_cost +=
$_actual_cost;
$actual_cost[$order_info['b_account']][$order_info['district_id']][$order_info['ecodimb']]
+= $_actual_cost;
+ }
-
-
+ if(!$_count)
+ {
+
$hits[$order_info['b_account']][$order_info['district_id']][$order_info['ecodimb']]
+= 1;
+
$accout_info[$order_info['b_account']] = true;
+
$district[$order_info['district_id']] = true;
+
$ecodimb[$order_info['ecodimb']] = true;
+ $_count = true;
}
-
-
$hits[$order_info['b_account']][$order_info['district_id']][$order_info['ecodimb']]
+= 1;
- $accout_info[$order_info['b_account']]
= true;
- $district[$order_info['district_id']] =
true;
- $ecodimb[$order_info['ecodimb']] = true;
-
-
}
}
//_debug_array($projects3);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11017] property: budget handling,
Sigurd Nes <=