fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7395] property: more on for import


From: Sigurd Nes
Subject: [Fmsystem-commits] [7395] property: more on for import
Date: Fri, 17 Jun 2011 13:17:44 +0000

Revision: 7395
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7395
Author:   sigurdne
Date:     2011-06-17 13:17:44 +0000 (Fri, 17 Jun 2011)
Log Message:
-----------
property: more on for import

Modified Paths:
--------------
    trunk/property/inc/import/default/cvs_import_kunstoversikt_bkb

Modified: trunk/property/inc/import/default/cvs_import_kunstoversikt_bkb
===================================================================
--- trunk/property/inc/import/default/cvs_import_kunstoversikt_bkb      
2011-06-17 13:17:27 UTC (rev 7394)
+++ trunk/property/inc/import/default/cvs_import_kunstoversikt_bkb      
2011-06-17 13:17:44 UTC (rev 7395)
@@ -19,6 +19,16 @@
                        $error = false;
                        $table = 'fm_entity_4_1';
                        $byggid = $this->decode($data[0]);
+                       if(!$byggid)
+                       {
+                               $this->errors[] = "Mangler objekt, hopper over: 
{$data[1]}";
+                               return true;
+                       }
+                       if(substr($byggid,0,1) == 'B')
+                       {
+                               $this->warnings[] = "BBB-objekt, hopper over: 
{$byggid}";
+                               return true;
+                       }
                        $location_code = substr($byggid,0,4) . '-0' . 
substr($byggid,-1);
 //_debug_array($location_code);
                        $location_data = 
execMethod('property.solocation.read_single', $location_code );
@@ -44,12 +54,19 @@
                        }
 
                        $id = (int)$data[2];
+                       
+                       $this->db->query("SELECT id FROM {$table} WHERE id = 
{$id}",__LINE__,__FILE__);
+                       if($this->db->next_record())
+                       {
+                               $this->errors[] = "ID finnes fra før: {$id}";
+                               return true;
+                       }
 
                        $this->messages[] = "Dagens dato er lagt inn som 
registreringsdato for {$id}  (mangler info)";
                        $entry_date = time();
 
-_debug_array($entry_date_info);
-_debug_array($entry_date);
+//_debug_array($entry_date_info);
+//_debug_array($entry_date);
                        $value_set = array();
 
                        $value_set['id']                                        
= $id;




reply via email to

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