fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8413] property: move config


From: Sigurd Nes
Subject: [Fmsystem-commits] [8413] property: move config
Date: Fri, 23 Dec 2011 07:41:22 +0000

Revision: 8413
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8413
Author:   sigurdne
Date:     2011-12-23 07:41:22 +0000 (Fri, 23 Dec 2011)
Log Message:
-----------
property: move config

Modified Paths:
--------------
    trunk/property/inc/export/default/Basware_X114
    trunk/property/setup/tables_update.inc.php

Modified: trunk/property/inc/export/default/Basware_X114
===================================================================
--- trunk/property/inc/export/default/Basware_X114      2011-12-23 07:40:21 UTC 
(rev 8412)
+++ trunk/property/inc/export/default/Basware_X114      2011-12-23 07:41:22 UTC 
(rev 8413)
@@ -56,7 +56,7 @@
                        
                        if(!isset($this->custom_config->config_data['export']))
                        {
-                               $this->initiate_config();
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'admin.uiconfig2.index', 'location_id' => 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice')) );
                        }
                        
                        if 
(isset($this->custom_config->config_data['export']['cleanup_old']) && 
$this->custom_config->config_data['export']['cleanup_old'])
@@ -68,34 +68,6 @@
 
_debug_array($this->custom_config->config_data['export']['cleanup_old']);die(); 
                       
                }
 
-               protected function initiate_config()
-               {
-                       $receipt_section = 
$this->custom_config->add_section(array
-                               (
-                                       'name' => 'export',
-                                       'descr' => 'Invoice export'
-                               )
-                       );
-                       $receipt = $this->custom_config->add_attrib(array
-                               (
-                                       'section_id'    => 
$receipt_section['section_id'],
-                                       'input_type'    => 'text',
-                                       'name'                  => 
'cleanup_old',
-                                       'descr'                 => 'Overføre 
manuelt registrerte fakturaer rett til historikk'
-                               )
-                       );
-                       $receipt = $this->custom_config->add_attrib(array
-                               (
-                                       'section_id'    => 
$receipt_section['section_id'],
-                                       'input_type'    => 'date',
-                                       'name'                  => 
'dato_aarsavslutning',
-                                       'descr'                 => "Dato for 
årsavslutning: overført pr. desember foregående år"
-                               )
-                       );
-                       $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'admin.uiconfig2.list_attrib', 'section_id' => 
$receipt_section['section_id'] , 'location_id' => 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice')) );
-               }
-
-
                protected function cleanup_old()
                {
                        $this->db->transaction_begin();

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2011-12-23 07:40:21 UTC (rev 
8412)
+++ trunk/property/setup/tables_update.inc.php  2011-12-23 07:41:22 UTC (rev 
8413)
@@ -5539,7 +5539,7 @@
        }
 
        /**
-       * Update property version from 0.9.17.626 to 0.9.17.627
+       * Update property version from 0.9.17.627 to 0.9.17.628
        * Alter primary key
        */
        $test[] = '0.9.17.627';
@@ -5559,7 +5559,7 @@
        }
 
        /**
-       * Update property version from 0.9.17.627 to 0.9.17.628
+       * Update property version from 0.9.17.628 to 0.9.17.629
        * Add appname to responsibility_role in order to filter by defining app.
        */
        $test[] = '0.9.17.628';
@@ -5579,6 +5579,212 @@
        }
 
        /**
+       * Update property version from 0.9.17.629 to 0.9.17.630
+       * Add invoice config as separate section
+       */
+       $test[] = '0.9.17.629';
+       function property_upgrade0_9_17_629()
+       {
+//             $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $custom_config  = 
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property', 
'.invoice'));
+
+               // common
+               $receipt_section_common = $custom_config->add_section(array
+                       (
+                               'name' => 'common',
+                               'descr' => 'common invoice config'
+                       )
+               );
+
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'host',
+                               'descr'                 => 'Host'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'user',
+                               'descr'                 => 'User'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'input_type'    => 'password',
+                               'name'                  => 'password',
+                               'descr'                 => 'Password'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'method',
+                               'descr'                 => 'Export / import 
method',
+                       )
+               );
+               $receipt = $custom_config->edit_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'method',
+                               'descr'                 => 'Export / import 
method',
+                               'new_choice'    => 'local'
+                       )
+               );
+               $receipt = $custom_config->edit_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'method',
+                               'descr'                 => 'Export / import 
method',
+                               'new_choice'    => 'ftp'
+                       )
+               );
+               $receipt = $custom_config->edit_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'method',
+                               'descr'                 => 'Export / import 
method',
+                               'new_choice'    => 'ssh'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'basedir',
+                               'descr'                 => 'basedir on remote 
server'
+                       )
+               );
+
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'invoice_approval',
+                               'descr'                 => 'Number of persons 
required to approve for payment',
+                       )
+               );
+
+               $receipt = $custom_config->edit_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'invoice_approval',
+                               'descr'                 => 'Number of persons 
required to approve for payment',
+                               'new_choice'    => '1'
+                       )
+               );
+               $receipt = $custom_config->edit_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_common['section_id'],
+                               'attrib_id'             => 
$receipt['attrib_id'],
+                               'input_type'    => 'listbox',
+                               'name'                  => 'invoice_approval',
+                               'descr'                 => 'Number of persons 
required to approve for payment',
+                               'new_choice'    => '2'
+                       )
+               );
+
+
+
+               // import:
+               $receipt_section_import = $custom_config->add_section(array
+                       (
+                               'name' => 'import',
+                               'descr' => 'import invoice config'
+                       )
+               );
+
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_import['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'path',
+                               'descr'                 => 'path on local sever 
to store imported files'
+                       )
+               );
+
+               //export
+               $receipt_section_export = $custom_config->add_section(array
+                       (
+                               'name' => 'export',
+                               'descr' => 'Invoice export'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'cleanup_old',
+                               'descr'                 => 'Overføre manuelt 
registrerte fakturaer rett til historikk'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'date',
+                               'name'                  => 
'dato_aarsavslutning',
+                               'descr'                 => "Dato for 
årsavslutning: overført pr. desember foregående år"
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'path',
+                               'descr'                 => 'path on local sever 
to store exported files'
+                       )
+               );
+
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'pre_path',
+                               'descr'                 => 'path on local sever 
to store exported files for pre approved vouchers'
+                       )
+               );
+
+
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'text',
+                               'name'                  => 'cleanup_old',
+                               'descr'                 => 'Overføre manuelt 
registrerte fakturaer rett til historikk'
+                       )
+               );
+               $receipt = $custom_config->add_attrib(array
+                       (
+                               'section_id'    => 
$receipt_section_export['section_id'],
+                               'input_type'    => 'date',
+                               'name'                  => 
'dato_aarsavslutning',
+                               'descr'                 => "Dato for 
årsavslutning: overført pr. desember foregående år"
+                       )
+               );
+
+
+       //      if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.630';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+       /**
        * Update property version from 0.9.17.607 to 0.9.17.608
        * Add more room for address at tickets
        * 




reply via email to

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