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

SF.net SVN: ledger-smb:[4479] addons/1.3/budgetting/branches/1.0/sql/ modules/budgetting-menu.sql



Revision: 4479
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4479&view=rev
Author:   einhverfr
Date:     2012-03-16 02:21:11 +0000 (Fri, 16 Mar 2012)
Log Message:
-----------
Correcting budget menu scripts, fixing bug 3496746

Modified Paths:
--------------
    addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-menu.sql

Modified: addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-menu.sql
===================================================================
--- addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-menu.sql	2012-03-16 01:51:52 UTC (rev 4478)
+++ addons/1.3/budgetting/branches/1.0/sql/modules/budgetting-menu.sql	2012-03-16 02:21:11 UTC (rev 4479)
@@ -18,9 +18,14 @@
 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');
+WITH cv (cv) AS
+ ( select currval('menu_node_id_seq') - 1)
+SELECT menu_insert(id, 2, 'Reports') 
+  FROM menu_node 
+  JOIN cv ON cv = id;
 
+
+
 INSERT INTO menu_attribute(node_id, attribute, value)
      values (currval('menu_node_id_seq'), 'module', 'budgets.pl');
 

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