[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10969] property: budget handling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10969] property: budget handling |
Date: |
Wed, 06 Mar 2013 09:03:39 +0000 |
Revision: 10969
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10969
Author: sigurdne
Date: 2013-03-06 09:03:38 +0000 (Wed, 06 Mar 2013)
Log Message:
-----------
property: budget handling
Modified Paths:
--------------
trunk/property/inc/class.sobudget.inc.php
trunk/property/inc/class.soworkorder.inc.php
Modified: trunk/property/inc/class.sobudget.inc.php
===================================================================
--- trunk/property/inc/class.sobudget.inc.php 2013-03-05 18:57:52 UTC (rev
10968)
+++ trunk/property/inc/class.sobudget.inc.php 2013-03-06 09:03:38 UTC (rev
10969)
@@ -684,17 +684,19 @@
}
- $sql = "SELECT DISTINCT fm_workorder.id,
fm_workorder_status.closed, fm_workorder.budget,
fm_workorder.combined_cost,fm_location1.mva,fm_workorder.start_date,"
+ $sql = "SELECT DISTINCT fm_workorder.id,
fm_workorder_status.closed, sum(fm_workorder_budget.budget) AS budget,
sum(fm_workorder_budget.combined_cost) AS combined_cost
,fm_location1.mva,fm_workorder.start_date,"
. " fm_b_account.{$b_account_field} as
{$b_account_field}, district_id, fm_workorder.ecodimb"
. " FROM fm_workorder"
. " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
- . " {$this->join} fm_workorder_budget ON
fm_workorder.id = fm_workorder_budget.order_id"
+ . " {$this->join} fm_workorder_budget ON
(fm_workorder.id = fm_workorder_budget.order_id AND fm_workorder_budget.active
= 1 AND fm_workorder_budget.year = {$year})"
. " {$this->join} fm_b_account ON
fm_workorder.account_id = fm_b_account.id"
. " {$this->join} fm_project ON
fm_workorder.project_id = fm_project.id"
. " {$_join_district}"
. " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id"
- . " {$filtermethod_order}{$filtermethod}
{$querymethod} {$where} {$filtermethod_direction}";
-
+ . " {$filtermethod_order}{$filtermethod}
{$querymethod} {$where} {$filtermethod_direction}"
+ . " GROUP BY fm_workorder.id,
fm_workorder_status.closed, fm_location1.mva, fm_workorder.start_date,"
+ . " fm_b_account.{$b_account_field},
district_id, fm_workorder.ecodimb";
+//_debug_array($sql);
$this->db->query($sql . $ordermethod,__LINE__,__FILE__);
$sum_actual_cost = 0;
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2013-03-05 18:57:52 UTC
(rev 10968)
+++ trunk/property/inc/class.soworkorder.inc.php 2013-03-06 09:03:38 UTC
(rev 10969)
@@ -305,8 +305,8 @@
$uicols['classname'][] = 'rightClasss';
$uicols['sortable'][] = false;
- $cols .= ',fm_workorder.combined_cost';
- $cols_return[] = 'combined_cost';
+// $cols .= ',fm_workorder.combined_cost';
+// $cols_return[] = 'combined_cost';
$uicols['input_type'][] = 'text';
$uicols['name'][] =
'obligation';
$uicols['descr'][] =
lang('sum orders');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10969] property: budget handling,
Sigurd Nes <=