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

SF.net SVN: ledger-smb:[3117] addons/1.3



Revision: 3117
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3117&view=rev
Author:   einhverfr
Date:     2011-01-20 21:36:37 +0000 (Thu, 20 Jan 2011)

Log Message:
-----------
Correcting fixed asset installation issues, adding utility function to get and set the number of rows for the JE screen.

Modified Paths:
--------------
    addons/1.3/assets/trunk/sql/modules/Assets-tables.sql
    addons/1.3/base/trunk/sql/modules/Util.sql

Modified: addons/1.3/assets/trunk/sql/modules/Assets-tables.sql
===================================================================
--- addons/1.3/assets/trunk/sql/modules/Assets-tables.sql	2011-01-19 16:09:22 UTC (rev 3116)
+++ addons/1.3/assets/trunk/sql/modules/Assets-tables.sql	2011-01-20 21:36:37 UTC (rev 3117)
@@ -1,3 +1,10 @@
+
+INSERT INTO  account_link_description values ('asset_expense', 'f', 't');
+INSERT INTO  account_link_description values ('asset_gain', 'f', 't');
+INSERT INTO  account_link_description values ('asset_loss', 'f', 't');
+INSERT INTO  account_link_description values ('Fixed_Asset', 'f', 't');
+INSERT INTO  account_link_description values ('Asset_Dep', 'f', 't');
+
 CREATE TABLE asset_unit_class (
 	id int not null unique,
 	class text primary key

Modified: addons/1.3/base/trunk/sql/modules/Util.sql
===================================================================
--- addons/1.3/base/trunk/sql/modules/Util.sql	2011-01-19 16:09:22 UTC (rev 3116)
+++ addons/1.3/base/trunk/sql/modules/Util.sql	2011-01-20 21:36:37 UTC (rev 3117)
@@ -1,3 +1,23 @@
+CREATE OR REPLACE FUNCTION je_set_default_lines(in_rowcount int) returns int
+as
+$$
+BEGIN
+    UPDATE menu_attribute set value = $1 
+     where node_id = 74 and attribute='rowcount';
+
+    IF NOT FOUND THEN
+         INSERT INTO menu_attribute (node_id, attribute, value)
+              values (74, 'rowcount', $1);
+    END IF;
+    RETURN $1; 
+END;
+$$ language plpgsql;
+
+CREATE OR REPLACE FUNCTION je_get_default_lines() returns varchar as
+$$
+SELECT value FROM menu_attribute where node_id = 74 and attribute = 'rowcount';
+$$ language sql; 
+
 CREATE OR REPLACE FUNCTION department__list_all() RETURNS SETOF department AS
 $$
 SELECT * FROM department order by description;


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