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

SF.net SVN: ledger-smb:[3891] addons/1.3/budgetting/trunk/sql/modules



Revision: 3891
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3891&view=rev
Author:   einhverfr
Date:     2011-10-19 10:50:09 +0000 (Wed, 19 Oct 2011)
Log Message:
-----------
Budget module ready for use

Modified Paths:
--------------
    addons/1.3/budgetting/trunk/sql/modules/budgetting-menu.sql
    addons/1.3/budgetting/trunk/sql/modules/budgetting-roles.sql

Modified: addons/1.3/budgetting/trunk/sql/modules/budgetting-menu.sql
===================================================================
--- addons/1.3/budgetting/trunk/sql/modules/budgetting-menu.sql	2011-10-19 08:55:46 UTC (rev 3890)
+++ addons/1.3/budgetting/trunk/sql/modules/budgetting-menu.sql	2011-10-19 10:50:09 UTC (rev 3891)
@@ -1 +1,40 @@
--- TODO
+BEGIN;
+
+SELECT menu_insert(109, 5, 'Budgets');
+
+INSERT INTO menu_attribute(node_id, attribute, value) 
+     values (currval('menu_node_id_seq'), 'menu', '1');
+
+SELECT menu_insert(currval('menu_node_id_seq')::int, 1, 'Add Budget');
+
+INSERT INTO menu_attribute(node_id, attribute, value)
+     values (currval('menu_node_id_seq'), 'module', 'budgets.pl');
+
+INSERT INTO menu_attribute(node_id, attribute, value)
+     values (currval('menu_node_id_seq'), 'action', 'new_budget');
+
+INSERT 
+  INTO menu_acl(node_id, acl_type, role_name)
+SELECT currval('menu_node_id_seq'), 'allow', 
+       'lsmb_' || current_database() || '__budget_enter';
+
+SELECT menu_insert(parent, 2, 'Reports') 
+  FROM menu_node WHERE id = currval('menu_node_id_seq');
+
+INSERT INTO menu_attribute(node_id, attribute, value)
+     values (currval('menu_node_id_seq'), 'module', 'budgets.pl');
+
+INSERT INTO menu_attribute(node_id, attribute, value)
+     values (currval('menu_node_id_seq'), 'action', 'begin_search');
+
+INSERT 
+  INTO menu_acl(node_id, acl_type, role_name)
+SELECT currval('menu_node_id_seq'), 'allow', 
+       'lsmb_' || current_database() || '__budget_approve';
+
+INSERT 
+  INTO menu_acl(node_id, acl_type, role_name)
+SELECT currval('menu_node_id_seq'), 'allow', 
+       'lsmb_' || current_database() || '__budget_obsolete';
+
+COMMIT;

Modified: addons/1.3/budgetting/trunk/sql/modules/budgetting-roles.sql
===================================================================
--- addons/1.3/budgetting/trunk/sql/modules/budgetting-roles.sql	2011-10-19 08:55:46 UTC (rev 3890)
+++ addons/1.3/budgetting/trunk/sql/modules/budgetting-roles.sql	2011-10-19 10:50:09 UTC (rev 3891)
@@ -12,7 +12,7 @@
 TO "lsmb_<?lsmb dbname ?>__budget_enter";
 
 GRANT UPDATE (approved_at, approved_by) on budget_info 
-TO "lsmb_<?lsmb dbname ?>__budget_approve"
+TO "lsmb_<?lsmb dbname ?>__budget_approve";
 
 GRANT UPDATE (obsolete_at, obsolete_by) on budget_info
 TO "lsmb_<?lsmb dbname ?>__budget_obsolete";

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