UpdateDatabase.php
authorAlan Knowles <alan@roojs.com>
Wed, 25 Feb 2015 08:46:52 +0000 (16:46 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 Feb 2015 08:46:52 +0000 (16:46 +0800)
UpdateDatabase.php

index ac1e89a..5d3fbe5 100644 (file)
@@ -325,111 +325,6 @@ class Pman_Xtuple_UpdateDatabase extends Pman_Core_UpdateDatabase
         $ia->importCsv($csv);
     }
     
-    function addBankAccounts() {
-        
-        $accnt = DB_DataObject::factory('subaccnt');
-        if (!$accnt->get('subaccnt_number', '01')) {
-            echo "SKIP Bank account creation - no subaccnt - 01\n";
-            return;
-        }
-        
-        $bankaccnt = DB_DataObject::factory('bankaccnt');
-        
-        $bankaccnt->whereAdd("
-            bankaccnt_name != ''
-        ");
-        // do we have any bank accounts.. with names...
-        if($bankaccnt->count()){
-            return;
-        }
-        $bankaccnt = DB_DataObject::factory('bankaccnt');
-    
-        if(!$bankaccnt->get('bankaccnt_name', 'Current Account')){
-            // create a standard account.
-            $accnt = DB_DataObject::factory('accnt');
-            $accnt->setFrom(array(
-                'accnt_number' => '131',
-                'accnt_descrip' => 'Current Account',
-                'accnt_comments' => '',
-                'accnt_profit' => '01',
-                'accnt_sub' => '01',
-                'accnt_type' => 'A',
-                'accnt_extref' => '',
-                'accnt_closedpost' => false,
-                'accnt_forwardupdate' => false,
-                'accnt_subaccnttype_code' => 'CA',
-                'accnt_curr_id' => $accnt->sqlValue("baseCurrId()"),
-                'accnt_active' => true
-            ));
-
-            if(!$accnt->find(true)){
-                $accnt->insert();
-            }
-
-            $bankaccnt->setFrom(array(
-                'bankaccnt_name' => 'Current Account',
-                'bankaccnt_descrip' => 'Current Account',
-                'bankaccnt_bankname' => 'Current Account',
-                'bankaccnt_accntnumber' => 'N/A',
-                'bankaccnt_ar' => true,
-                'bankaccnt_ap' => true,
-                'bankaccnt_nextchknum' => 5000,
-                'bankaccnt_type' => 'K',
-                'bankaccnt_accnt_id' => $accnt->pid(),
-                'bankaccnt_curr_id' => $bankaccnt->sqlValue("baseCurrId()"),
-                'bankaccnt_notes' => '',
-                'bankaccnt_routing' => '',
-                'bankaccnt_ach_enabled' => false,
-                'bankaccnt_ach_origintype' => 'I'
-            ));
-
-            $bankaccnt->insert();
-        }
-
-        $bankaccnt = DB_DataObject::factory('bankaccnt');
-
-        if(!$bankaccnt->get('bankaccnt_name', 'Savings Account')){
-            $accnt = DB_DataObject::factory('accnt');
-            $accnt->setFrom(array(
-                'accnt_number' => '404',
-                'accnt_descrip' => 'Savings Account',
-                'accnt_comments' => '',
-                'accnt_profit' => '01',
-                'accnt_sub' => '01',
-                'accnt_type' => 'A',
-                'accnt_extref' => '',
-                'accnt_closedpost' => false,
-                'accnt_forwardupdate' => false,
-                'accnt_subaccnttype_code' => 'CA',
-                'accnt_curr_id' => $accnt->sqlValue("baseCurrId()"),
-                'accnt_active' => true
-            ));
-
-            if(!$accnt->find(true)){
-                $accnt->insert();
-            }
-
-            $bankaccnt->setFrom(array(
-                'bankaccnt_name' => 'Savings Account',
-                'bankaccnt_descrip' => 'Savings Account',
-                'bankaccnt_bankname' => 'Savings Account',
-                'bankaccnt_accntnumber' => 'N/A',
-                'bankaccnt_ar' => true,
-                'bankaccnt_ap' => true,
-                'bankaccnt_nextchknum' => 5000,
-                'bankaccnt_type' => 'K',
-                'bankaccnt_accnt_id' => $accnt->pid(),
-                'bankaccnt_curr_id' => $bankaccnt->sqlValue("baseCurrId()"),
-                'bankaccnt_notes' => '',
-                'bankaccnt_routing' => '',
-                'bankaccnt_ach_enabled' => false,
-                'bankaccnt_ach_origintype' => 'I'
-            ));
-
-            $bankaccnt->insert();
-        }
-    }
-    
-    }
+   
     
 }
\ No newline at end of file