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

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



Revision: 2578
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2578&view=rev
Author:   einhverfr
Date:     2009-04-28 05:27:50 +0000 (Tue, 28 Apr 2009)

Log Message:
-----------
Properly handling NULL inputs on business_id in select for payment

Modified Paths:
--------------
    trunk/sql/modules/Payment.sql

Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql	2009-04-28 04:31:29 UTC (rev 2577)
+++ trunk/sql/modules/Payment.sql	2009-04-28 05:27:50 UTC (rev 2578)
@@ -325,8 +325,9 @@
 		   WHERE (a.batch_id = in_batch_id
 		          OR (a.invoice_class = in_account_class
 		             AND a.approved
-			 AND c.business_id = 
+			 AND (c.business_id = 
 				coalesce(in_business_id, c.business_id)
+				OR in_business_id is null)
 		         AND ((a.transdate >= COALESCE(in_date_from, a.transdate)
 		               AND a.transdate <= COALESCE(in_date_to, a.transdate)))
 		         AND c.entity_class = in_account_class


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