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

SF.net SVN: ledger-smb:[6780] trunk/sql/modules/Inventory_Report.sql



Revision: 6780
          http://sourceforge.net/p/ledger-smb/code/6780
Author:   einhverfr
Date:     2014-02-06 07:35:00 +0000 (Thu, 06 Feb 2014)
Log Message:
-----------
Deleting inventory reports now works too.  Now to menu items.

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

Modified: trunk/sql/modules/Inventory_Report.sql
===================================================================
--- trunk/sql/modules/Inventory_Report.sql	2014-02-06 07:30:51 UTC (rev 6779)
+++ trunk/sql/modules/Inventory_Report.sql	2014-02-06 07:35:00 UTC (rev 6780)
@@ -23,6 +23,14 @@
 RETURNING id;
 $$;
 
+CREATE OR REPLACE FUNCTION inventory_report__delete(in_id int)
+RETURNS int LANGUAGE SQL AS
+$$
+DELETE FROM inventory_report_line WHERE adjust_id = $1;
+DELETE FROM inventory_report WHERE id = $1
+RETURNING id;
+$$;
+
 DROP TYPE IF EXISTS inventory_adjustment_info CASCADE;
 
 CREATE TYPE inventory_adjustment_info AS (

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


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits