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

SF.net SVN: ledger-smb:[5273] trunk/sql/modules/Payroll.sql



Revision: 5273
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5273&view=rev
Author:   einhverfr
Date:     2012-11-27 08:04:38 +0000 (Tue, 27 Nov 2012)
Log Message:
-----------
Payroll.sql now loads properly.

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

Modified: trunk/sql/modules/Payroll.sql
===================================================================
--- trunk/sql/modules/Payroll.sql	2012-11-27 07:47:54 UTC (rev 5272)
+++ trunk/sql/modules/Payroll.sql	2012-11-27 08:04:38 UTC (rev 5273)
@@ -90,8 +90,10 @@
 in_id int, in_account_id int, in_pic_id int, in_country_id int,
 in_label text, in_unit text, in_default_amount numeric
 ) RETURNS payroll_income_type AS $$
+
+   DECLARE retval payroll_income_type;
+
 BEGIN
-
    UPDATE payroll_income_type
       SET account_id = in_account_id,
           pic_id = in_pic_id,
@@ -102,7 +104,8 @@
     WHERE id = in_id;
 
    IF FOUND THEN
-       RETURN payroll_income_type__get(in_id);
+       retval := payroll_income_type__get(in_id);
+       RETURN retval;
    END IF;
 
    INSERT INTO payroll_income_type
@@ -110,7 +113,8 @@
    VALUES (in_account_id, in_pic_id, in_country_id, in_label, in_unit, 
            in_default_amount);
 
-   RETURN payroll_income_type__get(currval('payroll_income_type_id_seq')::int);
+   retval := payroll_income_type__get(currval('payroll_income_type_id_seq')::int);
+   RETURN retval;
 
 END;
 $$ LANGUAGE PLPGSQL;

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