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

SF.net SVN: ledger-smb:[2711] trunk/sql/modules/test/Draft.sql



Revision: 2711
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2711&view=rev
Author:   einhverfr
Date:     2009-07-03 05:54:29 +0000 (Fri, 03 Jul 2009)

Log Message:
-----------
Corrected drafts tests in dbtest

Modified Paths:
--------------
    trunk/sql/modules/test/Draft.sql

Modified: trunk/sql/modules/test/Draft.sql
===================================================================
--- trunk/sql/modules/test/Draft.sql	2009-06-29 16:52:55 UTC (rev 2710)
+++ trunk/sql/modules/test/Draft.sql	2009-07-03 05:54:29 UTC (rev 2711)
@@ -1,10 +1,17 @@
 BEGIN;
 \i Base.sql
+INSERT INTO entity (id, entity_class, name, country_id)
+VALUES (-1000, 1, '__TEST', 243);
+
+INSERT INTO entity_credit_account (id, meta_number, entity_class, entity_id)
+VALUES (-1000, '_testv', 1, -1000); 
+INSERT INTO entity_credit_account (id, meta_number, entity_class, entity_id)
+VALUES (-1001, '_testc', 2, -1000); 
 SELECT account_save(NULL, '00001', 'test only', 'A', NULL, NULL, FALSE, '{}');
 SELECT account_save(NULL, '00002', 'test only', 'A', NULL, NULL, FALSE, '{}');
 INSERT INTO ap (invnumber, entity_credit_account, amount, netamount, paid, 
 	approved, curr)
-select '_TEST AP', min(id), '100', '100', '0', FALSE, 'USD'
+select '_TEST AP', -1000, '100', '100', '0', FALSE, 'USD'
 FROM entity_credit_account WHERE entity_class = 1;
 
 INSERT INTO acc_trans (chart_id, trans_id, amount, approved)
@@ -18,7 +25,7 @@
 
 INSERT INTO ar (invnumber, entity_credit_account, amount, netamount, paid, 
 	approved, curr)
-select '_TEST AR', min(id), '100', '100', '0', FALSE, 'USD'
+select '_TEST AR', -1001, '100', '100', '0', FALSE, 'USD'
 FROM entity_credit_account WHERE entity_class = 2;
 
 INSERT INTO acc_trans (chart_id, trans_id, amount, approved)


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