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

SF.net SVN: ledger-smb:[3572] trunk/sql



Revision: 3572
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3572&view=rev
Author:   ehuelsmann
Date:     2011-07-26 22:03:21 +0000 (Tue, 26 Jul 2011)

Log Message:
-----------
Fix bug 3372204: Add letterhead editing menu item.

Modified Paths:
--------------
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Roles.sql

Added Paths:
-----------
    trunk/sql/upgrade/3572-letterhead-template-editing.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-07-26 21:51:08 UTC (rev 3571)
+++ trunk/sql/Pg-database.sql	2011-07-26 22:03:21 UTC (rev 3572)
@@ -2241,7 +2241,7 @@
 -- Name: menu_node_id_seq; Type: SEQUENCE SET; Schema: public; Owner: ledgersmb
 --
 
-SELECT pg_catalog.setval('menu_node_id_seq', 240, true);
+SELECT pg_catalog.setval('menu_node_id_seq', 242, true);
 
 
 --
@@ -2399,6 +2399,7 @@
 169	Quotation	156	13
 170	RFQ	156	14
 171	Timecard	156	15
+241	Letterhead	156	16
 173	Invoice	172	1
 174	AR Transaction	172	2
 175	AP Transaction	172	3
@@ -2414,6 +2415,7 @@
 185	Quotation	172	13
 186	RFQ	172	14
 187	Timecard	172	15
+242	Letterhead	172	16
 189	POS Invoice	188	1
 198	AR Voucher	1	2
 3	Sales Invoice	1	3
@@ -2530,7 +2532,7 @@
 -- Name: menu_attribute_id_seq; Type: SEQUENCE SET; Schema: public; Owner: ledgersmb
 --
 
-SELECT pg_catalog.setval('menu_attribute_id_seq', 641, true);
+SELECT pg_catalog.setval('menu_attribute_id_seq', 649, true);
 
 
 --
@@ -2920,6 +2922,7 @@
 169	module	am.pl	400
 170	module	am.pl	401
 171	module	am.pl	402
+241	module	am.pl	642
 157	action	list_templates	403
 158	action	list_templates	404
 159	action	list_templates	405
@@ -2935,6 +2938,7 @@
 169	action	list_templates	415
 170	action	list_templates	416
 171	action	list_templates	417
+241	action	list_templates	643
 157	template	income_statement	418
 158	template	balance_sheet	419
 159	template	invoice	420
@@ -2950,6 +2954,7 @@
 169	template	quotation	430
 170	template	rfq	431
 171	template	timecard	432
+241	template	letterhead	644
 157	format	HTML	433
 158	format	HTML	434
 159	format	HTML	435
@@ -2965,6 +2970,7 @@
 169	format	HTML	445
 170	format	HTML	446
 171	format	HTML	447
+241	format	HTML	645
 172	menu	1	448
 173	action	list_templates	449
 174	action	list_templates	450
@@ -2981,6 +2987,7 @@
 185	action	list_templates	461
 186	action	list_templates	462
 187	action	list_templates	463
+242	action	list_templates	646
 173	module	am.pl	464
 174	module	am.pl	465
 175	module	am.pl	466
@@ -2996,6 +3003,7 @@
 185	module	am.pl	476
 186	module	am.pl	477
 187	module	am.pl	478
+242	module	am.pl	647
 173	format	LATEX	479
 174	format	LATEX	480
 175	format	LATEX	481
@@ -3011,6 +3019,7 @@
 185	format	LATEX	491
 186	format	LATEX	492
 187	format	LATEX	493
+242	format	LATEX	648
 173	template	invoice	506
 174	template	ar_transaction	507
 175	template	ap_transaction	508
@@ -3026,6 +3035,7 @@
 187	template	timecard	520
 183	template	check	516
 184	template	receipt	517
+242	template	letterhead	649
 188	menu	1	521
 189	module	am.pl	522
 189	action	list_templates	523

Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql	2011-07-26 21:51:08 UTC (rev 3571)
+++ trunk/sql/modules/Roles.sql	2011-07-26 22:03:21 UTC (rev 3572)
@@ -1471,6 +1471,10 @@
 values (189, 'allow', 'lsmb_<?lsmb dbname ?>__template_edit');
 INSERT INTO menu_acl (node_id, acl_type, role_name)
 values (190, 'allow', 'lsmb_<?lsmb dbname ?>__template_edit');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (241, 'allow', 'lsmb_<?lsmb dbname ?>__template_edit');
+INSERT INTO menu_acl (node_id, acl_type, role_name)
+values (242, 'allow', 'lsmb_<?lsmb dbname ?>__template_edit');
 
 CREATE ROLE "lsmb_<?lsmb dbname ?>__users_manage"
 WITH INHERIT NOLOGIN

Added: trunk/sql/upgrade/3572-letterhead-template-editing.sql
===================================================================
--- trunk/sql/upgrade/3572-letterhead-template-editing.sql	                        (rev 0)
+++ trunk/sql/upgrade/3572-letterhead-template-editing.sql	2011-07-26 22:03:21 UTC (rev 3572)
@@ -0,0 +1,16 @@
+-- Copy Letterhead HTML and TeX menus from their respective Invoice counterparts
+insert into menu_node (id, label, parent, position) values (241, 'Letterhead', 159, 16);
+insert into menu_node (id, label, parent, position) values (242, 'Letterhead', 172, 16);
+
+
+insert into menu_attribute
+  select 241 as node_id, attribute, value from menu_attribute where node_id = 159;
+insert into menu_attribute
+  select 242 as node_id, attribute, value from menu_attribute where node_id = 173;
+
+insert into menu_acl
+  select nextval('menu_acl_id_seq'), role_name, acl_type, 241 as node_id
+  from menu_acl where node_id = 159;
+insert into menu_acl
+  select nextval('menu_acl_id_seq'), role_name, acl_type, 242 as node_id
+  from menu_acl where node_id = 173;


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