phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/cron export_info_as_files.php synk...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc/cron export_info_as_files.php synk...
Date: Mon, 24 Sep 2007 11:20:27 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   07/09/24 11:20:27

Modified files:
        inc/cron       : export_info_as_files.php 
                         synkroniser_med_boei.php 

Log message:
        update

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/cron/export_info_as_files.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/property/inc/cron/synkroniser_med_boei.php?cvsroot=phpgroupware&r1=1.6&r2=1.7

Patches:
Index: export_info_as_files.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/cron/export_info_as_files.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- export_info_as_files.php    31 Aug 2007 06:41:48 -0000      1.6
+++ export_info_as_files.php    24 Sep 2007 11:20:27 -0000      1.7
@@ -24,7 +24,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage custom
-       * @version $Id: export_info_as_files.php,v 1.6 2007/08/31 06:41:48 
sigurdne Exp $
+       * @version $Id: export_info_as_files.php,v 1.7 2007/09/24 11:20:27 
sigurdne Exp $
        */
 
        /**
@@ -245,11 +245,11 @@
 
                function export_tenants()
                {
-                       $descr = array('Objekt', 'Bygg','Inngang','Leieobjekt', 
'Objekt Navn', 'Etternavn', 'Fornavn', 'Kontakt 
tlf','Gatenavn','GateNr','Etasje','Antall 
Rom','Boareal','Ferdigdato','klargjøringsstatus');
-                       $name = array('loc1', 'loc2', 
'loc3','loc4','loc1_name', 'last_name', 'first_name', 
'contact_phone','street_name','street_number','etasje','antallrom','boareal','finnish_date','klargj_st');
+                       $descr = array('Objekt', 
'Bygg','Inngang','Leieobjekt','Flyttenr', 'Objekt Navn', 'Etternavn', 
'Fornavn', 'Kontakt tlf','Gatenavn','GateNr','Etasje','Antall 
Rom','Boareal','Ferdigdato','klargjøringsstatus');
+                       $name = array('loc1', 'loc2', 
'loc3','loc4','flyttenr','loc1_name', 'last_name', 'first_name', 
'contact_phone','street_name','street_number','etasje','antallrom','boareal','finnish_date','klargj_st');
                
                        $filename= 'LEIETAKER';
-                       $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,fm_location4.finnish_date,fm_location4.klargj_st
 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) ORDER BY 
last_name ASC";
+                       $sql = "SELECT 
fm_location4.location_code,fm_location4.loc1,fm_location4.loc2,fm_location4.loc3,fm_location4.loc4,fm_location4.flyttenr,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,fm_location4.finnish_date,fm_location4.klargj_st
 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) ORDER BY 
last_name ASC";
 
                        $this->export_to_file($name,$descr,$filename, $sql);
                }

Index: synkroniser_med_boei.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/cron/synkroniser_med_boei.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- synkroniser_med_boei.php    16 Aug 2007 13:26:48 -0000      1.6
+++ synkroniser_med_boei.php    24 Sep 2007 11:20:27 -0000      1.7
@@ -24,7 +24,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage custom
-       * @version $Id: synkroniser_med_boei.php,v 1.6 2007/08/16 13:26:48 
sigurdne Exp $
+       * @version $Id: synkroniser_med_boei.php,v 1.7 2007/09/24 11:20:27 
sigurdne Exp $
        */
 
        /**
@@ -512,7 +512,7 @@
                   . " v_Leieobjekt.objekt_id, v_Leieobjekt.leie_id, 
v_Leieobjekt.leieobjekttype_id, v_Leieobjekt.bygg_id, v_Leieobjekt.seksjons_id,"
                   . " v_Leieobjekt.formaal_id, v_Leieobjekt.gateadresse_id, 
v_Leieobjekt.gatenr, v_Leieobjekt.etasje, v_Leieobjekt.antallrom,"
                   . " v_Leieobjekt.boareal, v_Leieobjekt.livslopsstd, 
v_Leieobjekt.heis, v_Leieobjekt.driftsstatus_id, v_Leieobjekt.leietaker_id,"
-                  . " v_Leieobjekt.beregnet_boa"
+                  . " v_Leieobjekt.beregnet_boa, v_Leieobjekt.flyttenr"
                   . " FROM v_Leieobjekt LEFT OUTER JOIN"
                   . " fm_location4 ON v_Leieobjekt.objekt_id = 
fm_location4.loc1 AND v_Leieobjekt.leie_id = fm_location4.loc4"
                   . " WHERE fm_location4.loc1 IS NULL";
@@ -539,7 +539,8 @@
                                 'heis'                         => 
$this->db_boei->f('heis'),
                                 'driftsstatus_id'      => 
$this->db_boei->f('driftsstatus_id'),
                                 'tenant_id'            => 
$this->db_boei->f('leietaker_id'),
-                                'beregnet_boa'         => 
$this->db_boei->f('beregnet_boa')
+                                'beregnet_boa'         => 
$this->db_boei->f('beregnet_boa'),
+                                'flyttenr'             => 
$this->db_boei->f('flyttenr')
                                 );
                                $leieobjekt_latin[]= array (
                                 'location_code'        => 
$this->db_boei->f('location_code'),
@@ -558,7 +559,8 @@
                                 'heis'                         => 
$this->db_boei->f('heis'),
                                 'driftsstatus_id'      => 
$this->db_boei->f('driftsstatus_id'),
                                 'tenant_id'            => 
$this->db_boei->f('leietaker_id'),
-                                'beregnet_boa'         => 
$this->db_boei->f('beregnet_boa')
+                                'beregnet_boa'         => 
$this->db_boei->f('beregnet_boa'),
+                                'flyttenr'             => 
$this->db_boei->f('flyttenr')
                                 );
 
                        }
@@ -570,10 +572,10 @@
                        {
 
                                $sql2_utf = "INSERT INTO fm_location4 
(location_code, loc1, loc4, leieobjekttype_id, loc2, loc3, category, street_id, 
street_number, etasje, antallrom, boareal, livslopsstd, heis, driftsstatus_id,
-                      tenant_id, beregnet_boa)"
+                      tenant_id, beregnet_boa, flyttenr)"
                                        . "VALUES (" . 
$this->bocommon->validate_db_insert($leieobjekt_utf[$i]) . ")";
                                $sql2_latin = "INSERT INTO fm_location4 
(location_code, loc1, loc4, leieobjekttype_id, loc2, loc3, category, street_id, 
street_number, etasje, antallrom, boareal, livslopsstd, heis, driftsstatus_id,
-                      tenant_id, beregnet_boa)"
+                      tenant_id, beregnet_boa, flyttenr)"
                                        . "VALUES (" . 
$this->bocommon->validate_db_insert($leieobjekt_latin[$i]) . ")";
 
                                $this->db->query($sql2_latin,__LINE__,__FILE__);
@@ -659,7 +661,7 @@
 
                function oppdater_leieobjekt()
                {                       
-                       $sql = " SELECT TOP 100 PERCENT 
objekt_id,leie_id,leietaker_id, boareal, formaal_id, gateadresse_id, gatenr, 
etasje,driftsstatus_id"
+                       $sql = " SELECT TOP 100 PERCENT 
objekt_id,leie_id,leietaker_id, boareal, formaal_id, gateadresse_id, gatenr, 
etasje,driftsstatus_id, flyttenr"
                                . " FROM  v_Leieobjekt"; // WHERE 
v_Leieobjekt.formaal_id NOT IN (99)";
 
                        $this->db_boei->query($sql,__LINE__,__FILE__);
@@ -677,7 +679,8 @@
                                . " street_id = '" . 
$this->db_boei->f('gateadresse_id') . "',"
                                . " street_number = '" . 
$this->bocommon->ascii2utf($this->db_boei->f('gatenr')) . "',"
                                . " driftsstatus_id = '" . 
$this->db_boei->f('driftsstatus_id') . "',"
-                               . " boareal = '" . $this->db_boei->f('boareal') 
. "'"
+                               . " boareal = '" . $this->db_boei->f('boareal') 
. "',"
+                               . " flyttenr = '" . 
$this->db_boei->f('flyttenr') . "'"
                                . " WHERE  loc1 = '" . 
$this->db_boei->f('objekt_id') . "'  AND  loc4= '" . 
$this->db_boei->f('leie_id') . "'";
                                $sql2_latin = " UPDATE  fm_location4 SET "
                                . " tenant_id = '" . 
$this->db_boei->f('leietaker_id') . "',"
@@ -686,7 +689,8 @@
                                . " street_id = '" . 
$this->db_boei->f('gateadresse_id') . "',"
                                . " street_number = '" . 
$this->db_boei->f('gatenr') . "',"
                                . " driftsstatus_id = '" . 
$this->db_boei->f('driftsstatus_id') . "',"
-                               . " boareal = '" . $this->db_boei->f('boareal') 
. "'"
+                               . " boareal = '" . $this->db_boei->f('boareal') 
. "',"
+                               . " flyttenr = '" . 
$this->db_boei->f('flyttenr') . "'"
                                . " WHERE  loc1 = '" . 
$this->db_boei->f('objekt_id') . "'  AND  loc4= '" . 
$this->db_boei->f('leie_id') . "'";
 
                                $this->db->query($sql2_latin,__LINE__,__FILE__);




reply via email to

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