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

SF.net SVN: ledger-smb:[4222] branches/1.3/sql/modules/Payment.sql



Revision: 4222
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4222&view=rev
Author:   ehuelsmann
Date:     2011-12-17 08:58:12 +0000 (Sat, 17 Dec 2011)
Log Message:
-----------
Align payment_get_open_invoices() with Perl code which does
 "($form{vc} eq 'customer'\) \? 'buy' : 'sell'", effectively inverting
column selection.

Modified Paths:
--------------
    branches/1.3/sql/modules/Payment.sql

Modified: branches/1.3/sql/modules/Payment.sql
===================================================================
--- branches/1.3/sql/modules/Payment.sql	2011-12-16 12:32:01 UTC (rev 4221)
+++ branches/1.3/sql/modules/Payment.sql	2011-12-17 08:58:12 UTC (rev 4222)
@@ -151,7 +151,7 @@
 		       (CASE WHEN a.curr = (SELECT * from defaults_get_defaultcurrency())
                          THEN 1
 		        ELSE
-		        (CASE WHEN in_account_class =1
+		        (CASE WHEN in_account_class = 2
 		              THEN ex.buy
 		              ELSE ex.sell END)
 		        END) as amount_fx, 
@@ -166,7 +166,7 @@
 		        (CASE WHEN a.curr = (SELECT * from defaults_get_defaultcurrency())
                          THEN 1
 		        ELSE
-		        (CASE WHEN in_account_class =1
+		        (CASE WHEN in_account_class = 2
 		              THEN ex.buy
 		              ELSE ex.sell END)
 		        END) as discount_fx,		        
@@ -181,14 +181,14 @@
 		        (CASE WHEN a.curr = (SELECT * from defaults_get_defaultcurrency())
                          THEN 1
 		         ELSE
-		         (CASE WHEN in_account_class =1
+		         (CASE WHEN in_account_class = 2
 		              THEN ex.buy
 		              ELSE ex.sell END)
 		         END) AS due_fx,
 		        (CASE WHEN a.curr = (SELECT * from defaults_get_defaultcurrency())
 		         THEN 1
 		         ELSE
-		        (CASE WHEN in_account_class =1
+		        (CASE WHEN in_account_class = 2
 		         THEN ex.buy
 		         ELSE ex.sell END)
 		         END) AS exchangerate

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