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

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



Revision: 3630
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3630&view=rev
Author:   einhverfr
Date:     2011-08-04 17:58:53 +0000 (Thu, 04 Aug 2011)

Log Message:
-----------
Correcting test case failure, dbtest.t, test 97

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

Modified: trunk/sql/modules/Voucher.sql
===================================================================
--- trunk/sql/modules/Voucher.sql	2011-08-04 17:26:36 UTC (rev 3629)
+++ trunk/sql/modules/Voucher.sql	2011-08-04 17:58:53 UTC (rev 3630)
@@ -287,10 +287,16 @@
                 FROM batch b
                 JOIN batch_class c ON (b.batch_class_id = c.id)
                 JOIN users u ON (u.entity_id = b.created_by)
-                LEFT JOIN voucher v ON (v.batch_id = b.id) where v.id is null
-                GROUP BY b.id, c.class, b.description, u.username, b.created_on, 
-                        b.control_code, b.default_date
-                ORDER BY b.control_code, b.description
+                LEFT JOIN voucher v ON (v.batch_id = b.id) 
+               where v.id is null
+                     and(u.entity_id = in_created_by_eid 
+                     or in_created_by_eid is null) and
+                     (in_description is null or b.description 
+                     like '%'  || in_description || '%') and
+                     (in_class_id is null or c.id = in_class_id)
+            GROUP BY b.id, c.class, b.description, u.username, b.created_on, 
+                     b.control_code, b.default_date
+            ORDER BY b.control_code, b.description
 
 		
 	LOOP

Modified: trunk/sql/modules/test/Voucher.sql
===================================================================
--- trunk/sql/modules/test/Voucher.sql	2011-08-04 17:26:36 UTC (rev 3629)
+++ trunk/sql/modules/test/Voucher.sql	2011-08-04 17:58:53 UTC (rev 3630)
@@ -72,7 +72,7 @@
 SELECT 'Empty Batch Detected', count(*) = 1
   FROM batch_search_empty(1,                        -- Batch class ID
                           'EMPTY BATCH TEST',       -- Batch description
-                          -3,                       -- Entity ID
+                          -100,                       -- Entity ID
        	                  NULL::numeric,            -- Amount greater than
        	                  NULL::numeric,            -- Amount less than
        	                  'f'::bool                 -- Approved


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