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

SF.net SVN: ledger-smb: [2040] trunk/sql/Pg-database.sql



Revision: 2040
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2040&view=rev
Author:   einhverfr
Date:     2008-01-11 22:05:26 -0800 (Fri, 11 Jan 2008)

Log Message:
-----------
Fixing (in Pg-database) 1771834, inventory lost when converting order to invoice

Modified Paths:
--------------
    trunk/sql/Pg-database.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2008-01-12 05:50:36 UTC (rev 2039)
+++ trunk/sql/Pg-database.sql	2008-01-12 06:05:26 UTC (rev 2040)
@@ -1549,32 +1549,6 @@
 CREATE TRIGGER del_exchangerate BEFORE DELETE ON oe FOR EACH ROW EXECUTE PROCEDURE del_exchangerate();
 -- end trigger
 --
-CREATE FUNCTION check_inventory() RETURNS TRIGGER AS '
-
-declare
-  itemid int;
-  row_data inventory%rowtype;
-
-begin
-
-  if not old.quotation then
-    for row_data in select * from inventory where trans_id = old.id loop
-      select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;
-
-      if itemid is null then
-	delete from inventory where trans_id = old.id and orderitems_id = row_data.orderitems_id;
-      end if;
-    end loop;
-  end if;
-return old;
-end;
-' language 'plpgsql';
--- end function
---
-CREATE TRIGGER check_inventory AFTER UPDATE ON oe FOR EACH ROW EXECUTE PROCEDURE check_inventory();
--- end trigger
---
---
 CREATE FUNCTION check_department() RETURNS TRIGGER AS '
 
 declare


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