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

SF.net SVN: ledger-smb: [1071] branches/1.2/sql/Pg-database.sql



Revision: 1071
          http://svn.sourceforge.net/ledger-smb/?rev=1071&view=rev
Author:   linuxpoet
Date:     2007-04-12 17:36:33 -0700 (Thu, 12 Apr 2007)

Log Message:
-----------
fix avgcost() and lastcost() to not use float

Modified Paths:
--------------
    branches/1.2/sql/Pg-database.sql

Modified: branches/1.2/sql/Pg-database.sql
===================================================================
--- branches/1.2/sql/Pg-database.sql	2007-04-12 22:40:31 UTC (rev 1070)
+++ branches/1.2/sql/Pg-database.sql	2007-04-13 00:36:33 UTC (rev 1071)
@@ -1014,12 +1014,12 @@
 CREATE TRIGGER del_recurring AFTER DELETE ON gl FOR EACH ROW EXECUTE PROCEDURE del_recurring();
 -- end trigger
 --
-CREATE FUNCTION avgcost(int) RETURNS FLOAT AS '
+CREATE FUNCTION avgcost(int) RETURNS NUMERIC AS '
 
 DECLARE
 
-v_cost float;
-v_qty float;
+v_cost numeric;
+v_qty numeric;
 v_parts_id alias for $1;
 
 BEGIN
@@ -1046,11 +1046,11 @@
 ' language 'plpgsql';
 -- end function
 --
-CREATE FUNCTION lastcost(int) RETURNS FLOAT AS '
+CREATE FUNCTION lastcost(int) RETURNS numeric AS '
 
 DECLARE
 
-v_cost float;
+v_cost numeric;
 v_parts_id alias for $1;
 
 BEGIN


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