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

SF.net SVN: ledger-smb:[5235] trunk/sql/modules/Transaction_Templates.sql



Revision: 5235
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5235&view=rev
Author:   bmtober
Date:     2012-11-22 02:12:58 +0000 (Thu, 22 Nov 2012)
Log Message:
-----------
Replacing references to non-existent journal table with journal_entry.

Modified Paths:
--------------
    trunk/sql/modules/Transaction_Templates.sql

Modified: trunk/sql/modules/Transaction_Templates.sql
===================================================================
--- trunk/sql/modules/Transaction_Templates.sql	2012-11-22 02:10:09 UTC (rev 5234)
+++ trunk/sql/modules/Transaction_Templates.sql	2012-11-22 02:12:58 UTC (rev 5235)
@@ -7,9 +7,9 @@
 in_transaction_date date,
 in_approved bool,
 in_is_template bool
-) RETURNS journal AS 
+) RETURNS journal_entry AS 
 $$
-DECLARE retval journal;
+DECLARE retval journal_entry;
 BEGIN
 	INSERT INTO journal_entry (source, description, entry_type, transaction_date,
 			approved, is_template)
@@ -17,14 +17,14 @@
 			coalesce(in_approved, false), 
 			coalesce(in_is_template, false));
 
-	SELECT * INTO retval FROM journal WHERE id = currval('journal_id_seq');
+	SELECT * INTO retval FROM journal_entry WHERE id = currval('journal_id_seq');
 	RETURN retval;
 END;
 $$ language plpgsql; 
 
 CREATE OR REPLACE FUNCTION journal__add_line(
 in_account_id int, in_journal_id int, in_amount numeric, 
-in_cleared bool, in_memo text, in_business_units int[],
+in_cleared bool, in_memo text, in_business_units int[]
 ) RETURNS journal_line AS $$
 DECLARE retval journal_line;
 BEGIN
@@ -125,7 +125,7 @@
 SELECT * FROM eca_invoice where journal_id = $1;
 $$ language sql;
 
-CREATE OR REPLACE FUNCTION journal__get_entry(in_id int) RETURNS journal AS
+CREATE OR REPLACE FUNCTION journal__get_entry(in_id int) RETURNS journal_entry AS
 $$
 SELECT * FROM journal_entry where id = $1;
 $$ language sql;

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