[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3368] trunk/sql/modules
- Subject: SF.net SVN: ledger-smb:[3368] trunk/sql/modules
- From: ..hidden..
- Date: Tue, 28 Jun 2011 12:10:07 +0000
Revision: 3368
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3368&view=rev
Author: einhverfr
Date: 2011-06-28 12:10:07 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
End of Year tests now work properly
Modified Paths:
--------------
trunk/sql/modules/EndOfYear.sql
trunk/sql/modules/test/EndOfYear.sql
Modified: trunk/sql/modules/EndOfYear.sql
===================================================================
--- trunk/sql/modules/EndOfYear.sql 2011-06-28 11:08:05 UTC (rev 3367)
+++ trunk/sql/modules/EndOfYear.sql 2011-06-28 12:10:07 UTC (rev 3368)
@@ -36,7 +36,7 @@
COALESCE( MAX (cp.credits), 0)
FROM
(SELECT * FROM acc_trans WHERE transdate <= in_end_date AND
- transdate > COALESCE(cp_date, '1900-01-01')) a
+ transdate > COALESCE(cp_date, '1200-01-01')) a
FULL OUTER JOIN (
select account_id, end_date, amount, debits, credits
from account_checkpoint
Modified: trunk/sql/modules/test/EndOfYear.sql
===================================================================
--- trunk/sql/modules/test/EndOfYear.sql 2011-06-28 11:08:05 UTC (rev 3367)
+++ trunk/sql/modules/test/EndOfYear.sql 2011-06-28 12:10:07 UTC (rev 3368)
@@ -1,3 +1,5 @@
+
+
BEGIN;
\i Base.sql
@@ -4,20 +6,21 @@
DELETE FROM account_checkpoint;
DELETE FROM yearend;
+
INSERT INTO gl (id, reference, description, transdate, approved)
-values (-1000, 'test', 'test', '20020-01-01', true); -- way in the future.
-INSERT INTO acc_trans (trans_id, account_id, transdate, amount, approved)
-values (-1000, '-1000', '20020-01-01', '10000', true);
-INSERT INTO acc_trans (trans_id, account_id, transdate, amount, approved)
-values (-1000, '-1001', '20020-01-01', '-10000', true);
+values (-1000, 'test', 'test', '1520-01-01', true); -- way in the future.
+INSERT INTO acc_trans (trans_id, chart_id, transdate, amount, approved)
+values (-1000, '-1000', '1520-01-01', '10000', true);
+INSERT INTO acc_trans (trans_id, chart_id, transdate, amount, approved)
+values (-1000, '-1001', '1520-01-01', '-10000', true);
insert into test_result (success, test_name)
-select eoy_close_books('20020-01-01', 'test', 'test', '-1002'),
+select eoy_close_books('1520-05-01', 'test', 'test', '-1002'),
'Close books succeeded';
insert into test_result (success, test_name)
-select amount = 1000, 'Account checkpoint added'
-from account_checkpoint where end_date = '20020-01-01' and account_id = -1000;
+select amount = 10000, 'Account checkpoint added'
+from account_checkpoint where end_date = '1520-05-01' and account_id = -1000;
SELECT * FROM test_result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.