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

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



Revision: 5812
          http://sourceforge.net/p/ledger-smb/code/5812
Author:   ehuelsmann
Date:     2013-05-16 21:20:08 +0000 (Thu, 16 May 2013)
Log Message:
-----------
Fix loading errors (due to typos etc) found by Chris Calef.

Modified Paths:
--------------
    trunk/sql/modules/EndOfYear.sql
    trunk/sql/modules/Goods.sql
    trunk/sql/modules/Inventory_Report.sql
    trunk/sql/modules/Roles.sql
    trunk/sql/modules/Transaction_Templates.sql

Modified: trunk/sql/modules/EndOfYear.sql
===================================================================
--- trunk/sql/modules/EndOfYear.sql	2013-05-16 12:50:39 UTC (rev 5811)
+++ trunk/sql/modules/EndOfYear.sql	2013-05-16 21:20:08 UTC (rev 5812)
@@ -11,22 +11,6 @@
 is returned is non-determinative and so only the end date shoudl be relied on.
 $$;
 
-CREATE OR REPLACE FUNCTION eoy__reopen_books_at(in_reopen_date date) 
-RETURNS BOOL
-LANGUAGE SQL AS
-$$
-
-    SELECT eoy_reopen_books(end_date) 
-      FROM (SELECT end_date 
-              FROM account_checkpoint
-             WHERE end_date >= $1
-             GROUP BY end_date) eoy_dates
-  ORDER BY end_date;
-
-SELECT eoy_create_checkpoint($1 - 1) > 0;
-
-$$;
-
 CREATE OR REPLACE FUNCTION eoy_create_checkpoint(in_end_date date)
 RETURNS int AS
 $$
@@ -197,6 +181,23 @@
 COMMENT ON FUNCTION eoy_reopen_books(in_end_date date) IS
 $$ Removes checkpoints and reverses yearend transactions on in_end_date$$;
 
+CREATE OR REPLACE FUNCTION eoy__reopen_books_at(in_reopen_date date) 
+RETURNS BOOL
+LANGUAGE SQL AS
+$$
+
+    SELECT eoy_reopen_books(end_date) 
+      FROM (SELECT end_date 
+              FROM account_checkpoint
+             WHERE end_date >= $1
+             GROUP BY end_date) eoy_dates
+  ORDER BY end_date;
+
+SELECT eoy_create_checkpoint($1 - 1) > 0;
+
+$$;
+
+
 CREATE OR REPLACE FUNCTION account__obtain_balance
 (in_transdate date, in_account_id int)
 RETURNS numeric AS

Modified: trunk/sql/modules/Goods.sql
===================================================================
--- trunk/sql/modules/Goods.sql	2013-05-16 12:50:39 UTC (rev 5811)
+++ trunk/sql/modules/Goods.sql	2013-05-16 21:20:08 UTC (rev 5812)
@@ -367,7 +367,7 @@
 CREATE OR REPLACE FUNCTION inventory_adjust__get_lines(in_id int)
 RETURNS SETOF inventory_report_line LANGUAGE SQL AS
 $$
-SELECT * FROM inventory_report_line l WHERE id = $1
+SELECT * FROM inventory_report_line l WHERE adjust_id = $1
  ORDER BY parts_id;
 $$;
 

Modified: trunk/sql/modules/Inventory_Report.sql
===================================================================
--- trunk/sql/modules/Inventory_Report.sql	2013-05-16 12:50:39 UTC (rev 5811)
+++ trunk/sql/modules/Inventory_Report.sql	2013-05-16 21:20:08 UTC (rev 5812)
@@ -32,7 +32,7 @@
    SELECT r.id, r.transdate, r.source, r.ar_trans_id, r.ap_trans_id,
           ar.invnumber, ap.invnumber
      FROM inventory_report r
-     JOIN inventory_report_line l ON l.report_id = r.id 
+     JOIN inventory_report_line l ON l.adjust_id = r.id 
      JOIN parts p ON l.parts_id = p.id
 LEFT JOIN ar ON ar.id = r.ar_trans_id
 LEFT JOIN ap ON ap.id = r.ap_trans_id

Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql	2013-05-16 12:50:39 UTC (rev 5811)
+++ trunk/sql/modules/Roles.sql	2013-05-16 21:20:08 UTC (rev 5812)
@@ -1419,8 +1419,6 @@
 TO "lsmb_<?lsmb dbname ?>__users_manage";
 GRANT EXECUTE ON FUNCTION  admin__delete_user(text, bool)
 TO "lsmb_<?lsmb dbname ?>__users_manage";
-GRANT EXECUTE ON FUNCTION  admin__list_roles(text)
-TO "lsmb_<?lsmb dbname ?>__users_manage";
 GRANT EXECUTE ON FUNCTION  admin__delete_group(text)
 TO "lsmb_<?lsmb dbname ?>__users_manage";
 

Modified: trunk/sql/modules/Transaction_Templates.sql
===================================================================
--- trunk/sql/modules/Transaction_Templates.sql	2013-05-16 12:50:39 UTC (rev 5811)
+++ trunk/sql/modules/Transaction_Templates.sql	2013-05-16 21:20:08 UTC (rev 5812)
@@ -79,7 +79,7 @@
 meta_number text,
 entity_name text,
 entity_class text,
-nextdate date,
+nextdate date
 );
 
 CREATE OR REPLACE FUNCTION journal__search(

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