Fix #7123 - getting abra ready to test
[Pman.Xtuple] / UpdateDatabase.php
index 5d3fbe5..91b91e5 100644 (file)
@@ -103,7 +103,7 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
     }
     
     
-    function get($k = '',$opts)
+    function get($k = '',$opts=array())
     {
         $k = strtolower($k);
         
@@ -176,7 +176,8 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
                 HTML_FlexyFramework::get()->generateDataobjectsCache(true);
                 
                 $this->{$dirmethod}($dburl, $this->rootDir. "/Pman/$m/{$dbtype}.initdata");
-                $this->{'fixSequences'. $dbtype}();
+                // fixSequences does nto appar to work on postgres anymore
+                //$this->{'fixSequences'. $dbtype}();
                 
             }
               
@@ -217,9 +218,11 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
 //                'location', //?? just check hat one exists.
         ) : array($k);
         
-        
-        $core_opts = HTML_FlexyFramework::get()->page->opts;
-        if (!empty($core_opts['init'])) {
+         $core_opts = HTML_FlexyFramework::get()->page->opts;
+         
+         if (!empty($core_opts['base'])) {
+            DB_DataObject::DebugLevel(1);
+            DB_DataObject::factory('curr_symbol')->importFromArray($this, array($core_opts['base']));
             DB_DataObject::factory('curr_symbol')->setBase($this, $core_opts['base']);
         }
         
@@ -236,9 +239,8 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
         
         $this->updateMetricValue();
         
-         $this->addAccounts();
-        $this->addBankAccounts();
-        
+        $this->addAccounts();
+         
         
         
     }
@@ -283,25 +285,6 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
     
     
     
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    /*
-    
-    function updateData($k='')
-    {
-        
-        
-    }
-    */
      
     
      
@@ -312,6 +295,7 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
             return;
         }
         
+        // this might want to be configurable -- so that we could use different 'base files' for the accounts..
         require_once 'File/Convert.php';
         $cp = $this->tempName('xls');
         copy(dirname(__FILE__).'/Setup/accounts_sample.xls', $cp);