fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [8456] property: add missing join


From: Sigurd Nes
Subject: [Fmsystem-commits] [8456] property: add missing join
Date: Thu, 29 Dec 2011 18:18:44 +0000

Revision: 8456
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8456
Author:   sigurdne
Date:     2011-12-29 18:18:43 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
property: add missing join

Modified Paths:
--------------
    trunk/property/inc/class.sobudget.inc.php

Modified: trunk/property/inc/class.sobudget.inc.php
===================================================================
--- trunk/property/inc/class.sobudget.inc.php   2011-12-29 11:34:20 UTC (rev 
8455)
+++ trunk/property/inc/class.sobudget.inc.php   2011-12-29 18:18:43 UTC (rev 
8456)
@@ -42,6 +42,7 @@
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->db           = & $GLOBALS['phpgw']->db;
                        $this->join                     = & $this->db->join;
+                       $this->left_join        = & $this->db->left_join;
                        $this->like                     = & $this->db->like;
                }
 
@@ -758,14 +759,15 @@
                        $start_periode = date('Ym',mktime(2,0,0,1,1,$year));
                        $end_periode = date('Ym',mktime(2,0,0,12,31,$year));
 
-                       $sql = "SELECT fm_b_account.{$b_account_field} as 
$b_account_field, district_id, sum(godkjentbelop) as actual_cost,dimb FROM 
fm_ecobilagoverf"
-                               . " $this->join fm_b_account ON 
fm_ecobilagoverf.spbudact_code =fm_b_account.id"
-                               . " $this->join fm_location1 ON 
fm_ecobilagoverf.loc1 = fm_location1.loc1"
-                               . " $this->join fm_part_of_town ON 
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id"
+                       $sql = "SELECT fm_b_account.{$b_account_field} as 
{$b_account_field}, district_id, sum(godkjentbelop) as actual_cost,dimb FROM 
fm_ecobilagoverf"
+                               . " {$this->join} fm_b_account ON 
fm_ecobilagoverf.spbudact_code =fm_b_account.id"
+                               . " {$this->join} fm_location1 ON 
fm_ecobilagoverf.loc1 = fm_location1.loc1"
+                               . " {$this->join} fm_part_of_town ON 
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id"
+                               . " {$this->join} fm_workorder ON 
fm_ecobilagoverf.pmwrkord_code = fm_workorder.id"
+                               . " {$this->join} fm_project ON 
fm_workorder.project_id = fm_project.id"
                                . " WHERE periode >= $start_periode AND periode 
<= $end_periode {$filtermethod}"
                                . " GROUP BY fm_b_account.{$b_account_field}, 
district_id,dimb";
 
-                       //_debug_array($sql);
                        $this->db->query($sql,__LINE__,__FILE__);
 
                        while ($this->db->next_record())




reply via email to

[Prev in Thread] Current Thread [Next in Thread]