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

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



Revision: 5262
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5262&view=rev
Author:   einhverfr
Date:     2012-11-25 03:51:06 +0000 (Sun, 25 Nov 2012)
Log Message:
-----------
All modules but payroll are now loading transactionally

Modified Paths:
--------------
    trunk/sql/modules/EndOfYear.sql
    trunk/sql/modules/Entity.sql
    trunk/sql/modules/TaxForm.sql
    trunk/sql/modules/Transaction_Templates.sql
    trunk/sql/modules/Voucher.sql

Modified: trunk/sql/modules/EndOfYear.sql
===================================================================
--- trunk/sql/modules/EndOfYear.sql	2012-11-25 03:20:59 UTC (rev 5261)
+++ trunk/sql/modules/EndOfYear.sql	2012-11-25 03:51:06 UTC (rev 5262)
@@ -1,3 +1,5 @@
+BEGIN;
+
 CREATE OR REPLACE FUNCTION eoy_create_checkpoint(in_end_date date)
 RETURNS int AS
 $$
@@ -209,3 +211,5 @@
 
 COMMENT ON FUNCTION eoy_earnings_accounts() IS
 $$ Lists equity accounts for the retained earnings dropdown.$$;
+
+COMMIT;

Modified: trunk/sql/modules/Entity.sql
===================================================================
--- trunk/sql/modules/Entity.sql	2012-11-25 03:20:59 UTC (rev 5261)
+++ trunk/sql/modules/Entity.sql	2012-11-25 03:51:06 UTC (rev 5262)
@@ -5,6 +5,7 @@
 
 -- Docstrings already added to this file.
 
+BEGIN;
 
 CREATE OR REPLACE FUNCTION entity_save(
     in_entity_id int, in_name text, in_entity_class INT
@@ -139,3 +140,5 @@
 COMMENT ON FUNCTION entity__delete_bank_account(in_entity_id int, in_id int) IS
 $$ Deletes the bank account identitied by in_id if it is attached to the entity
 identified by entity_id.  Returns true if a record is deleted, false if not.$$;
+
+COMMIT;

Modified: trunk/sql/modules/TaxForm.sql
===================================================================
--- trunk/sql/modules/TaxForm.sql	2012-11-25 03:20:59 UTC (rev 5261)
+++ trunk/sql/modules/TaxForm.sql	2012-11-25 03:51:06 UTC (rev 5262)
@@ -1,3 +1,5 @@
+BEGIN;
+
 CREATE OR REPLACE FUNCTION tax_form__save(in_id int, in_country_id int, 
                           in_form_name text, in_default_reportable bool)
 RETURNS int AS
@@ -43,6 +45,7 @@
 COMMENT ON FUNCTION tax_form__list_all() IS
 $$ Returns a set of all tax forms, ordered by country_id and id$$; 
 
+DROP TYPE IF EXISTS taxform_list CASCADE;
 CREATE TYPE taxform_list AS (
    id int,
    form_name text,
@@ -63,3 +66,5 @@
 COMMENT ON function tax_form__list_ext() IS
 $$ Returns a list of tax forms with an added field, country_name, to specify the
 name of the country.$$;
+
+COMMIT;

Modified: trunk/sql/modules/Transaction_Templates.sql
===================================================================
--- trunk/sql/modules/Transaction_Templates.sql	2012-11-25 03:20:59 UTC (rev 5261)
+++ trunk/sql/modules/Transaction_Templates.sql	2012-11-25 03:51:06 UTC (rev 5262)
@@ -1,5 +1,7 @@
 -- Many of these will have to be rewritten to work with 1.4
 
+BEGIN;
+
 CREATE OR REPLACE FUNCTION journal__add(
 in_source text,
 in_description text,
@@ -64,6 +66,8 @@
 END;
 $$ language plpgsql;
 
+
+DROP TYPE IF EXISTS journal_search_result CASCADE; 
 CREATE TYPE journal_search_result AS (
 id bigint,
 source text,
@@ -135,3 +139,5 @@
 select * from journal_line where journal_id = $1;
 $$ language sql;
 -- orders with inventory not supported yet.
+
+COMMIT;

Modified: trunk/sql/modules/Voucher.sql
===================================================================
--- trunk/sql/modules/Voucher.sql	2012-11-25 03:20:59 UTC (rev 5261)
+++ trunk/sql/modules/Voucher.sql	2012-11-25 03:51:06 UTC (rev 5262)
@@ -1,3 +1,4 @@
+BEGIN;
 
 CREATE OR REPLACE FUNCTION voucher_get_batch (in_batch_id integer) 
 RETURNS batch AS 
@@ -127,6 +128,7 @@
 COMMENT ON FUNCTION voucher__list (in_batch_id integer) IS
 $$ Retrieves a list of vouchers and amounts attached to the batch.$$;
 
+DROP TYPE IF EXISTS batch_list_item CASCADE;
 CREATE TYPE batch_list_item AS (
     id integer,
     batch_class text,
@@ -531,3 +533,5 @@
 
 COMMENT ON FUNCTION voucher__delete(in_voucher_id int) IS
 $$ Deletes the specified voucher from the batch.$$;
+
+COMMIT;

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