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

SF.net SVN: ledger-smb: [1601] trunk/sql/modules/Payment.sql



Revision: 1601
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1601&view=rev
Author:   einhverfr
Date:     2007-09-14 15:59:13 -0700 (Fri, 14 Sep 2007)

Log Message:
-----------
Correcting SQL errors in Payment.sql

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

Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql	2007-09-14 18:36:53 UTC (rev 1600)
+++ trunk/sql/modules/Payment.sql	2007-09-14 22:59:13 UTC (rev 1601)
@@ -185,7 +185,8 @@
 
 CREATE OR REPLACE FUNCTION payment_post 
 (in_trans_id int, in_source text, in_amount numeric, in_ar_ap_accno text,
-	in_cash_accno text, in_approved bool, in_payment_date, in_account_class)
+	in_cash_accno text, in_approved bool, in_payment_date date, 
+	in_account_class)
 RETURNS INT AS
 $$
 DECLARE out_entry_id int;
@@ -198,7 +199,7 @@
 	        END,
 	        in_trans_id, in_payment_date, in_approved, in_source);
 
-	INSERT INTO acc_trans (chart_id, amount
+	INSERT INTO acc_trans (chart_id, amount,
 	            trans_id, transdate, approved, source)
 	VALUES ((SELECT id FROM chart WHERE accno = in_cash_accno), 
 	        CASE WHEN in_account_class = 2 THEN in_amount * -1 
@@ -215,7 +216,7 @@
 COMMENT ON FUNCTION payment_post 
 (in_trans_id int, in_source text, in_amount numeric, in_ar_ap_accno text,
 	in_cash_accno text, in_approved bool, in_payment_date, in_account_class)
-$$
+IS $$
 This function takes the following arguments (prefaced with in_ in the db):
 trans_id:  Id for ar/ap transaction.
 source: text for source documnet identifier (for example, check number)


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