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

SF.net SVN: ledger-smb:[4267] addons/1.3/import_trans/trunk



Revision: 4267
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4267&view=rev
Author:   einhverfr
Date:     2012-01-20 06:42:31 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------

Adding transaction import menu setup script

Added Paths:
-----------
    addons/1.3/import_trans/trunk/sql/
    addons/1.3/import_trans/trunk/sql/modules/
    addons/1.3/import_trans/trunk/sql/modules/import-trans-menu.sql

Added: addons/1.3/import_trans/trunk/sql/modules/import-trans-menu.sql
===================================================================
--- addons/1.3/import_trans/trunk/sql/modules/import-trans-menu.sql	                        (rev 0)
+++ addons/1.3/import_trans/trunk/sql/modules/import-trans-menu.sql	2012-01-20 06:42:31 UTC (rev 4267)
@@ -0,0 +1,38 @@
+BEGIN;
+create temporary table menu_node_temp (node_id int, description text);
+
+insert into menu_node_temp (node_id, description)
+select menu_insert(0, 6, 'Transaction Import'), 'top';
+
+insert into menu_node_temp (node_id, description)
+select menu_insert(node_id, 1, 'AP Batch'), 'ap'
+FROM menu_node_temp where description = 'top';
+
+insert into menu_node_temp (node_id, description)
+select menu_insert(node_id, 2, 'GL Draft'), 'gl'
+FROM menu_node_temp where description = 'top';
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'menu', 1
+from menu_node_temp where description = 'top';
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'module', 'import_trans.pl'
+from menu_node_temp where description in ('ap', 'gl');
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'multi', '1'
+from menu_node_temp where description = 'ap';
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'type', 'ap_multi'
+from menu_node_temp where description = 'ap';
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'type', 'gl'
+from menu_node_temp where description = 'gl';
+
+insert into menu_attribute (node_id, attribute, value)
+select node_id, 'action', 'begin_import'
+from menu_node_temp where description in ('ap', 'gl');
+COMMIT;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.