[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14887] alter name of id of part_of_town
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14887] alter name of id of part_of_town |
Date: |
Sat, 02 Apr 2016 14:51:49 +0000 |
Revision: 14887
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14887
Author: sigurdne
Date: 2016-04-02 14:51:48 +0000 (Sat, 02 Apr 2016)
Log Message:
-----------
alter name of id of part_of_town
Modified Paths:
--------------
trunk/activitycalendar/inc/class.soactivity.inc.php
trunk/activitycalendar/inc/class.soorganization.inc.php
trunk/controller/inc/class.socontrol.inc.php
trunk/property/inc/class.bocommon.inc.php
trunk/property/inc/class.soXport.inc.php
trunk/property/inc/class.sobudget.inc.php
trunk/property/inc/class.socommon.inc.php
trunk/property/inc/class.soentity.inc.php
trunk/property/inc/class.sogeneric.inc.php
trunk/property/inc/class.soinvestment.inc.php
trunk/property/inc/class.soinvoice.inc.php
trunk/property/inc/class.solocation.inc.php
trunk/property/inc/class.sotenant_claim.inc.php
trunk/property/inc/class.sotts.inc.php
trunk/property/inc/class.soworkorder.inc.php
trunk/property/inc/cron/default/update_googlemap.php
trunk/property/setup/default_records.inc.php
trunk/property/setup/setup.inc.php
trunk/property/setup/tables_current.inc.php
trunk/property/setup/tables_update.inc.php
trunk/rental/inc/class.socomposite.inc.php
Modified: trunk/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soactivity.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/activitycalendar/inc/class.soactivity.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -556,15 +556,15 @@
function get_district_from_name( $name )
{
- $this->db->query("SELECT part_of_town_id FROM
fm_part_of_town where name like UPPER('%{$name}%') ", __LINE__, __FILE__);
+ $this->db->query("SELECT id FROM fm_part_of_town where
name like UPPER('%{$name}%') ", __LINE__, __FILE__);
$this->db->next_record();
- return $this->db->f('part_of_town_id');
+ return $this->db->f('id');
}
function get_district_from_id( $d_id )
{
$d_id = (int)$d_id;
- $this->db->query("SELECT name FROM fm_part_of_town
where part_of_town_id={$d_id}", __LINE__, __FILE__);
+ $this->db->query("SELECT name FROM fm_part_of_town
where id={$d_id}", __LINE__, __FILE__);
$this->db->next_record();
return $this->db->f('name', true);
}
@@ -574,7 +574,7 @@
$values = array();
if ($district_id != null)
{
- $sql = "SELECT district_id, name FROM
fm_part_of_town where part_of_town_id in ($district_id)";
+ $sql = "SELECT district_id, name FROM
fm_part_of_town where id in ($district_id)";
$this->db->query($sql, __LINE__, __FILE__);
while ($this->db->next_record())
{
@@ -588,7 +588,7 @@
function get_districts()
{
- $this->db->query("SELECT part_of_town_id, name FROM
fm_part_of_town district_id ", __LINE__, __FILE__);
+ $this->db->query("SELECT id, name FROM
fm_part_of_town", __LINE__, __FILE__);
$district = array();
while ($this->db->next_record())
{
@@ -598,7 +598,7 @@
continue;
}
$district[] = array(
- 'part_of_town_id' =>
$this->db->f('part_of_town_id'),
+ 'part_of_town_id' => $this->db->f('id'),
'name' => stripslashes($name)
);
}
Modified: trunk/activitycalendar/inc/class.soorganization.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soorganization.inc.php 2016-04-02
11:22:58 UTC (rev 14886)
+++ trunk/activitycalendar/inc/class.soorganization.inc.php 2016-04-02
14:51:48 UTC (rev 14887)
@@ -471,10 +471,10 @@
function get_district_from_name( $name )
{
- $this->db->query("SELECT part_of_town_id FROM
fm_part_of_town where name like UPPER('%{$name}%') ", __LINE__, __FILE__);
+ $this->db->query("SELECT id FROM fm_part_of_town where
name like UPPER('%{$name}%') ", __LINE__, __FILE__);
$this->db->next_record();
- $result = $this->db->f('part_of_town_id');
+ $result = $this->db->f('id');
return $result;
}
@@ -484,7 +484,7 @@
if ($district_id)
{
$district_id = (int)$district_id;
- $q1 = "SELECT fm_district.descr FROM
fm_part_of_town,fm_district WHERE
fm_part_of_town.part_of_town_id={$district_id} AND fm_district.id =
fm_part_of_town.district_id";
+ $q1 = "SELECT fm_district.descr FROM
fm_part_of_town,fm_district WHERE fm_part_of_town.id={$district_id} AND
fm_district.id = fm_part_of_town.district_id";
//var_dump($q1);
$this->db->query($q1, __LINE__, __FILE__);
$this->db->next_record();
Modified: trunk/controller/inc/class.socontrol.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/controller/inc/class.socontrol.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -1276,7 +1276,7 @@
$sql = "SELECT DISTINCT control_id"
. " FROM
controller_control_location_list {$this->join} fm_locations ON
controller_control_location_list.location_code = fm_locations.location_code"
. " {$this->join} fm_location1 ON
fm_locations.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_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id"
. " WHERE district_id =" .
(int)$filters['district_id'];
$db = & $GLOBALS['phpgw']->db;
@@ -1291,7 +1291,7 @@
$sql = "SELECT DISTINCT control_id"
. " FROM
controller_control_component_list {$this->join} fm_bim_item ON
controller_control_component_list.location_id = fm_bim_item.location_id AND
controller_control_component_list.component_id = fm_bim_item.id"
. " {$this->join} fm_location1 ON
fm_bim_item.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_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id"
. " WHERE district_id =" .
(int)$filters['district_id'];
$db->query($sql, __LINE__, __FILE__);
Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.bocommon.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -1195,7 +1195,7 @@
$cols.= ",fm_location1.loc1_name";
$joinmethod .= " {$this->join} fm_location1 ON
({$_location_table}.loc1 = fm_location1.loc1))";
$paranthesis .='(';
- $joinmethod .= " {$this->join} fm_part_of_town
ON (fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id))";
+ $joinmethod .= " {$this->join} fm_part_of_town
ON (fm_location1.part_of_town_id = fm_part_of_town.id))";
$paranthesis .='(';
$joinmethod .= " {$this->join} fm_owner ON
(fm_location1.owner_id = fm_owner.id))";
$paranthesis .='(';
Modified: trunk/property/inc/class.soXport.inc.php
===================================================================
--- trunk/property/inc/class.soXport.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.soXport.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -126,7 +126,7 @@
{
$this->db->query("SELECT
$meter_table.maaler_nr,$meter_table.loc1,$meter_table.loc2,$meter_table.loc3,fm_part_of_town.district_id
"
. " FROM $meter_table $this->join fm_location1
ON $meter_table.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 WHERE
$meter_table.ext_system_id='$anleggsnr'");
+ . " fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id WHERE
$meter_table.ext_system_id='$anleggsnr'");
$this->db->next_record();
@@ -154,7 +154,7 @@
. "
substring(fm_gab_location.gab_id,18,3)='$sekjonnr' AND"
. " fm_gab_location.loc1=fm_location1.loc1 AND"
. " fm_location1.owner_id=fm_owner.id AND"
- . " fm_location1.part_of_town_id =
fm_part_of_town.part_of_town_id ";
+ . " fm_location1.part_of_town_id =
fm_part_of_town.id ";
// . " and (fm_owner.category=0 or
fm_owner.category=2)";
$GLOBALS['phpgw']->db->query($sql, __LINE__, __FILE__);
@@ -569,7 +569,7 @@
function select_underbilag( $bilagsnr )
{
- $sql = "SELECT fm_ecobilag.*
,fm_part_of_town.district_id FROM (fm_location1 $this->join fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id) $this->join
fm_ecobilag ON fm_location1.loc1 = fm_ecobilag.loc1 WHERE bilagsnr='$bilagsnr'";
+ $sql = "SELECT fm_ecobilag.*
,fm_part_of_town.district_id FROM (fm_location1 $this->join fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id) $this->join fm_ecobilag ON
fm_location1.loc1 = fm_ecobilag.loc1 WHERE bilagsnr='$bilagsnr'";
$this->db->query($sql, __LINE__, __FILE__);
$i = 0;
Modified: trunk/property/inc/class.sobudget.inc.php
===================================================================
--- trunk/property/inc/class.sobudget.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.sobudget.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -652,7 +652,7 @@
. " {$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"
+ . " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id"
. " {$filtermethod_order}{$filtermethod}
{$querymethod} {$where} {$filtermethod_direction}"
. " ORDER BY fm_workorder.id ASC";
@@ -788,7 +788,7 @@
. " FROM fm_tts_tickets"
. " {$this->join} fm_b_account ON
fm_tts_tickets.b_account_id = fm_b_account.id "
. " {$this->join} fm_location1 ON
fm_tts_tickets.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 $filtermethod
$filtermethod2 $querymethod {$where} {$filtermethod_direction} GROUP BY
fm_b_account.{$b_account_field},district_id,fm_tts_tickets.ecodimb";
+ . " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id $filtermethod $filtermethod2
$querymethod {$where} {$filtermethod_direction} GROUP BY
fm_b_account.{$b_account_field},district_id,fm_tts_tickets.ecodimb";
//_debug_array($sql);die();
$this->db->query($sql . $ordermethod, __LINE__,
__FILE__);
@@ -814,7 +814,7 @@
. " FROM fm_tts_tickets"
. " {$this->join} fm_b_account ON
fm_tts_tickets.b_account_id = fm_b_account.id "
. " {$this->join} fm_location1 ON
fm_tts_tickets.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 {$filtermethod}
{$querymethod} {$where} {$filtermethod_direction} GROUP BY
fm_b_account.{$b_account_field},district_id,fm_tts_tickets.ecodimb";
+ . " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id {$filtermethod}
{$querymethod} {$where} {$filtermethod_direction} GROUP BY
fm_b_account.{$b_account_field},district_id,fm_tts_tickets.ecodimb";
$sql = str_replace('budget', 'actual_cost', $sql);
Modified: trunk/property/inc/class.socommon.inc.php
===================================================================
--- trunk/property/inc/class.socommon.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.socommon.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -210,13 +210,13 @@
{
$filter = "WHERE district_id = '$district_id'";
}
- $this->db->query("SELECT name, part_of_town_id,
district_id FROM fm_part_of_town $filter ORDER BY name ", __LINE__, __FILE__);
+ $this->db->query("SELECT name, id, district_id FROM
fm_part_of_town $filter ORDER BY name ", __LINE__, __FILE__);
while ($this->db->next_record())
{
$part_of_town[] = array
(
- 'id' => $this->db->f('part_of_town_id'),
+ 'id' => $this->db->f('id'),
'name' => $this->db->f('name', true),
'district_id' =>
$this->db->f('district_id')
);
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.soentity.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -560,7 +560,7 @@
}
else if ($part_of_town_id > 0 &&
$category['location_level'])
{
- $filtermethod .= " $where
fm_part_of_town.part_of_town_id='$part_of_town_id' ";
+ $filtermethod .= " $where
fm_part_of_town.id='$part_of_town_id' ";
$where = 'AND';
}
@@ -783,7 +783,7 @@
if (isset($category['location_level']) &&
$category['location_level'] > 0)
{
$sql .= "{$this->join} fm_location1 ON
(fm_bim_item.loc1 = fm_location1.loc1)";
- $sql .= "{$this->join} fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id)";
+ $sql .= "{$this->join} fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id)";
$sql .= "{$this->join} fm_owner ON
(fm_location1.owner_id = fm_owner.id)";
$sql .= "{$this->join} fm_locations ON
(fm_bim_item.location_code = fm_locations.location_code)";
@@ -1533,7 +1533,7 @@
}
else if ($part_of_town_id > 0 &&
$category['location_level'])
{
- $filtermethod .= " $where
fm_part_of_town.part_of_town_id='$part_of_town_id' ";
+ $filtermethod .= " $where
fm_part_of_town.id='$part_of_town_id' ";
$where = 'AND';
}
Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.sogeneric.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -402,7 +402,7 @@
$info = array
(
'table' => 'fm_part_of_town',
- 'id' => array('name' =>
'part_of_town_id', 'type' => 'int', 'descr' => lang('id')),
+ 'id' => array('name' => 'id',
'type' => 'int', 'descr' => lang('id')),
'fields' => array
(
array
Modified: trunk/property/inc/class.soinvestment.inc.php
===================================================================
--- trunk/property/inc/class.soinvestment.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/property/inc/class.soinvestment.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -99,7 +99,7 @@
if ($part_of_town_id)
{
- $filtermethod = "and
fm_part_of_town.part_of_town_id ='$part_of_town_id'";
+ $filtermethod = "and fm_part_of_town.id
='$part_of_town_id'";
}
if ($filter == 'investment')
@@ -119,7 +119,7 @@
. " FROM (((fm_investment $this->join
fm_investment_value ON ( fm_investment.entity_id =
fm_investment_value.entity_id) AND "
. " (fm_investment.invest_id =
fm_investment_value.invest_id )) "
. " $this->join fm_location1 ON
(fm_investment.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_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id)) "
. " WHERE ( current_index = '1' or
(this_index = NULL and index_count= '1')) AND entity_type ='$cat_id'
$filtermethod ";
}
else
@@ -132,7 +132,7 @@
. " fm_investment_value ON
(fm_investment_value.entity_id = fm_investment.entity_id) AND "
. " (fm_investment_value.invest_id =
fm_investment.invest_id)) "
. " $this->join fm_location1 ON
(fm_investment.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_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id)) "
. " WHERE ( current_index = '1' or
(this_index = NULL and index_count= '1')) AND entity_type ='$cat_id'
$filtermethod ";
}
if ($sql)
Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.soinvoice.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -137,7 +137,7 @@
{
$filtermethod .= " $where
district_id='$district_id' ";
$join_tables = " $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_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id)";
$where = 'AND';
}
@@ -720,7 +720,7 @@
$sql = "SELECT district_id,periode,sum(godkjentbelop)
as consume {$select_account_class}"
. " FROM fm_ecobilagoverf {$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_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id) "
. " {$this->join} fm_b_account ON
(fm_ecobilagoverf.spbudact_code = fm_b_account.id) "
. " WHERE (periode >='{$start_periode}' AND
periode <= '{$end_periode}' {$filtermethod})"
. " GROUP BY district_id,periode
$group_account_class"
@@ -746,7 +746,7 @@
$sql = "SELECT district_id,periode,sum(godkjentbelop)
as consume {$select_account_class}"
. " FROM fm_ecobilag {$this->join}
fm_location1 ON (fm_ecobilag.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_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id) "
. " {$this->join} fm_b_account ON
(fm_ecobilag.spbudact_code = fm_b_account.id) "
. " WHERE (1=1 {$filtermethod})"
. " GROUP BY district_id,periode
$group_account_class"
Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.solocation.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -410,7 +410,7 @@
}
// $paranthesis .='(';
- // $joinmethod .= "
{$this->join} fm_part_of_town ON (fm_location1.part_of_town_id =
fm_part_of_town.part_of_town_id))";
+ // $joinmethod .= "
{$this->join} fm_part_of_town ON (fm_location1.part_of_town_id =
fm_part_of_town.id))";
$config =
$this->soadmin_location->read_config('');
@@ -759,7 +759,7 @@
if ($part_of_town_id > 0)
{
- $filtermethod .= " $where
fm_part_of_town.part_of_town_id='$part_of_town_id' ";
+ $filtermethod .= " $where
fm_part_of_town.id='$part_of_town_id' ";
$where = 'AND';
}
@@ -1710,7 +1710,7 @@
$uicols['input_type'][] = 'text';
$groupmethod .= " ,fm_part_of_town.name";
$cols.=", fm_part_of_town.name as part_of_town";
- $filtermethod .= " $where
fm_part_of_town.part_of_town_id = {$part_of_town_id}";
+ $filtermethod .= " $where fm_part_of_town.id =
{$part_of_town_id}";
$where = 'AND';
}
@@ -1733,7 +1733,7 @@
$this->uicols = $uicols;
- $joinmethod = "{$this->join} fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id))";
+ $joinmethod = "{$this->join} fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id))";
$paranthesis .='(';
$joinmethod .= " {$this->join} fm_owner ON
(fm_location1.owner_id = fm_owner.id))";
$paranthesis .='(';
@@ -1943,8 +1943,8 @@
if ($part_of_town_id)
{
- $join_method = "{$this->join}
fm_part_of_town ON fm_part_of_town.part_of_town_id =
fm_location1.part_of_town_id";
- $filtermethod = 'AND
fm_part_of_town.part_of_town_id =' . (int)$part_of_town_id;
+ $join_method = "{$this->join}
fm_part_of_town ON fm_part_of_town.id = fm_location1.part_of_town_id";
+ $filtermethod = 'AND fm_part_of_town.id
=' . (int)$part_of_town_id;
}
}
else
Modified: trunk/property/inc/class.sotenant_claim.inc.php
===================================================================
--- trunk/property/inc/class.sotenant_claim.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/property/inc/class.sotenant_claim.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -121,7 +121,7 @@
. " $this->join fm_tenant on
fm_tenant_claim.tenant_id=fm_tenant.id"
. " $this->join fm_project ON fm_project.id =
fm_tenant_claim.project_id"
. " $this->join fm_location1 ON
fm_project.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_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.id"
. " $filtermethod $querymethod";
$this->db->query($sql, __LINE__, __FILE__);
Modified: trunk/property/inc/class.sotts.inc.php
===================================================================
--- trunk/property/inc/class.sotts.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/inc/class.sotts.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -383,7 +383,7 @@
if ($part_of_town_id > 0)
{
- $filtermethod .= " $where
fm_part_of_town.part_of_town_id= " . (int)$part_of_town_id;
+ $filtermethod .= " $where fm_part_of_town.id= "
. (int)$part_of_town_id;
$where = 'AND';
}
@@ -542,13 +542,13 @@
$union_budget = "SELECT {$return_fields_union}, 0 as
actual_cost ,SUM(fm_tts_budget.amount) as budget FROM fm_tts_tickets"
. " {$this->left_join} fm_location1 ON
fm_tts_tickets.loc1=fm_location1.loc1"
- . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id"
+ . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.id"
. " {$this->left_join} fm_district ON
fm_district.id = fm_part_of_town.district_id"
. " {$order_join}{$date_budget_join}"
. " LEFT OUTER JOIN fm_tts_views ON
(fm_tts_tickets.id = fm_tts_views.id AND
fm_tts_views.account_id='{$this->account}')";
$union_cost = "SELECT
{$return_fields_union},SUM(fm_tts_payments.amount) as actual_cost, 0 as budget
FROM fm_tts_tickets"
. " {$this->left_join} fm_location1 ON
fm_tts_tickets.loc1=fm_location1.loc1"
- . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id"
+ . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.id"
. " {$this->left_join} fm_district ON
fm_district.id = fm_part_of_town.district_id"
. " {$order_join}{$date_cost_join}"
. " LEFT OUTER JOIN fm_tts_views ON
(fm_tts_tickets.id = fm_tts_views.id AND
fm_tts_views.account_id='{$this->account}')";
@@ -564,7 +564,7 @@
$sql = "SELECT DISTINCT {$return_fields_plain} FROM
fm_tts_tickets"
. " {$this->left_join} fm_location1 ON
fm_tts_tickets.loc1=fm_location1.loc1"
- . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id"
+ . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.id"
. " {$this->left_join} fm_district ON
fm_district.id = fm_part_of_town.district_id"
. "
{$order_join}{$date_cost_join}{$date_budget_join}"
. " LEFT OUTER JOIN fm_tts_views ON
(fm_tts_tickets.id = fm_tts_views.id AND
fm_tts_views.account_id='{$this->account}')";
@@ -602,7 +602,7 @@
$sql_cnt = "SELECT DISTINCT budget,actual_cost,
fm_tts_tickets.id FROM fm_tts_tickets"
. " {$this->left_join} fm_location1 ON
fm_tts_tickets.loc1=fm_location1.loc1"
- . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id"
+ . " {$this->left_join} fm_part_of_town ON
fm_location1.part_of_town_id=fm_part_of_town.id"
. " {$this->left_join} fm_district ON
fm_district.id = fm_part_of_town.district_id"
. "
{$order_join}{$date_cost_join}{$date_budget_join}"
. " LEFT OUTER JOIN fm_tts_views ON
(fm_tts_tickets.id = fm_tts_views.id AND
fm_tts_views.account_id='{$this->account}')";
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/property/inc/class.soworkorder.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -2993,4 +2993,4 @@
}
return $this->db->transaction_commit();
}
- }
\ No newline at end of file
+ }
Modified: trunk/property/inc/cron/default/update_googlemap.php
===================================================================
--- trunk/property/inc/cron/default/update_googlemap.php 2016-04-02
11:22:58 UTC (rev 14886)
+++ trunk/property/inc/cron/default/update_googlemap.php 2016-04-02
14:51:48 UTC (rev 14887)
@@ -53,7 +53,7 @@
$area = "Bergen";
$sql = "SELECT
fm_location4.location_code,fm_location4.loc1,fm_location4.loc2,fm_location4.loc3,fm_location4.loc4,"
. " fm_location1.loc1_name,fm_tenant.id as
tenant_id,fm_tenant.last_name,fm_tenant.first_name,fm_tenant.contact_phone,fm_streetaddress.descr
as
street_name,street_number,fm_location4.street_id,fm_location4.etasje,fm_location4.antallrom,fm_location4.boareal"
- . " FROM ((((((( fm_location4 JOIN fm_location3
ON (fm_location4.loc3 = fm_location3.loc3) AND (fm_location4.loc2 =
fm_location3.loc2) AND (fm_location4.loc1 = fm_location3.loc1)) JOIN
fm_location2 ON (fm_location3.loc2 = fm_location2.loc2) AND (fm_location3.loc1
= fm_location2.loc1)) JOIN fm_location1 ON (fm_location2.loc1 =
fm_location1.loc1)) JOIN fm_owner ON ( fm_location1.owner_id=fm_owner.id)) JOIN
fm_part_of_town ON (
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id)) JOIN
fm_streetaddress ON ( fm_location4.street_id=fm_streetaddress.id)) JOIN
fm_tenant ON ( fm_location4.tenant_id=fm_tenant.id)) WHERE
(fm_location4.category !=99 OR fm_location4.category IS NULL) AND
driftsstatus_id > 0 ";
+ . " FROM ((((((( fm_location4 JOIN fm_location3
ON (fm_location4.loc3 = fm_location3.loc3) AND (fm_location4.loc2 =
fm_location3.loc2) AND (fm_location4.loc1 = fm_location3.loc1)) JOIN
fm_location2 ON (fm_location3.loc2 = fm_location2.loc2) AND (fm_location3.loc1
= fm_location2.loc1)) JOIN fm_location1 ON (fm_location2.loc1 =
fm_location1.loc1)) JOIN fm_owner ON ( fm_location1.owner_id=fm_owner.id)) JOIN
fm_part_of_town ON ( fm_location1.part_of_town_id=fm_part_of_town.id)) JOIN
fm_streetaddress ON ( fm_location4.street_id=fm_streetaddress.id)) JOIN
fm_tenant ON ( fm_location4.tenant_id=fm_tenant.id)) WHERE
(fm_location4.category !=99 OR fm_location4.category IS NULL) AND
driftsstatus_id > 0 ";
$this->db->query($sql, __LINE__, __FILE__);
Modified: trunk/property/setup/default_records.inc.php
===================================================================
--- trunk/property/setup/default_records.inc.php 2016-04-02 11:22:58 UTC
(rev 14886)
+++ trunk/property/setup/default_records.inc.php 2016-04-02 14:51:48 UTC
(rev 14887)
@@ -321,7 +321,7 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_config
(location_type, column_name, input_text, lookup_form, f_key, ref_to_category,
query_value, reference_table, reference_id, datatype, precision_, scale,
default_value, nullable) VALUES (4, 'tenant_id', NULL, 1, 1, NULL, 0,
'fm_tenant', 'id', 'int', 4, NULL, NULL, 'True')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_config
(location_type, column_name, input_text, lookup_form, f_key, ref_to_category,
query_value, reference_table, reference_id, datatype, precision_, scale,
default_value, nullable) VALUES (4, 'street_id', NULL, 1, 1, NULL, 1,
'fm_streetaddress', 'id', 'int', 4, NULL, NULL, 'True')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_config
(location_type, column_name, input_text, lookup_form, f_key, ref_to_category,
query_value, reference_table, reference_id, datatype, precision_, scale,
default_value, nullable) VALUES (1, 'owner_id', NULL, NULL, 1, 1, NULL,
'fm_owner', 'id', 'int', 4, NULL, NULL, 'True')");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_config
(location_type, column_name, input_text, lookup_form, f_key, ref_to_category,
query_value, reference_table, reference_id, datatype, precision_, scale,
default_value, nullable) VALUES (1, 'part_of_town_id', NULL, NULL, 1, NULL,
NULL, 'fm_part_of_town', 'part_of_town_id', 'int', 4, NULL, NULL, 'True')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_config
(location_type, column_name, input_text, lookup_form, f_key, ref_to_category,
query_value, reference_table, reference_id, datatype, precision_, scale,
default_value, nullable) VALUES (1, 'part_of_town_id', NULL, NULL, 1, NULL,
NULL, 'fm_part_of_town', 'id', 'int', 4, NULL, NULL, 'True')");
#
# Dumping data for table fm_tenant_category
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2016-04-02 11:22:58 UTC (rev 14886)
+++ trunk/property/setup/setup.inc.php 2016-04-02 14:51:48 UTC (rev 14887)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.695';
+ $setup_info['property']['version'] = '0.9.17.696';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/setup/tables_current.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -13,11 +13,11 @@
$phpgw_baseline = array(
'fm_part_of_town' => array(
'fd' => array(
- 'part_of_town_id' => array('type' => 'auto',
'precision' => '2', 'nullable' => False),
+ 'id' => array('type' => 'auto', 'precision' =>
'2', 'nullable' => False),
'name' => array('type' => 'varchar',
'precision' => '20', 'nullable' => True),
'district_id' => array('type' => 'int',
'precision' => '2', 'nullable' => True)
),
- 'pk' => array('part_of_town_id'),
+ 'pk' => array('id'),
'fk' => array(),
'ix' => array(),
'uc' => array()
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/property/setup/tables_update.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -8816,3 +8816,25 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ /**
+ * Update property version from 0.9.17.695 to 0.9.17.696
+ * Alter name of part of town id.
+ */
+ $test[] = '0.9.17.695';
+
+ function property_upgrade0_9_17_695()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
fm_location_config SET reference_id = 'id' WHERE column_name =
'part_of_town_id'");
+
+ $GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_part_of_town',
'part_of_town_id', 'id');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.696';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: trunk/rental/inc/class.socomposite.inc.php
===================================================================
--- trunk/rental/inc/class.socomposite.inc.php 2016-04-02 11:22:58 UTC (rev
14886)
+++ trunk/rental/inc/class.socomposite.inc.php 2016-04-02 14:51:48 UTC (rev
14887)
@@ -167,7 +167,7 @@
{
$joins .= " {$this->join} fm_locations ON
(rental_unit.location_code = fm_locations.location_code)";
$joins .= " {$this->join} fm_location1 ON
(fm_location1.loc1 = fm_locations.loc1)";
- $joins .= " {$this->join} fm_part_of_town
ON (fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id)";
+ $joins .= " {$this->join} fm_part_of_town
ON (fm_location1.part_of_town_id = fm_part_of_town.id)";
$filter_clauses[] =
"fm_part_of_town.district_id =" . (int)$filters['district_id'];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14887] alter name of id of part_of_town,
Sigurd Nes <=