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

SF.net SVN: ledger-smb:[5181] branches/1.3/LedgerSMB/AA.pm



Revision: 5181
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5181&view=rev
Author:   einhverfr
Date:     2012-11-10 10:13:26 +0000 (Sat, 10 Nov 2012)
Log Message:
-----------
Fixed credit usage calculations currency issues of previous commit

Modified Paths:
--------------
    branches/1.3/LedgerSMB/AA.pm

Modified: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm	2012-11-10 10:10:45 UTC (rev 5180)
+++ branches/1.3/LedgerSMB/AA.pm	2012-11-10 10:13:26 UTC (rev 5181)
@@ -1350,9 +1350,8 @@
     $form->{creditremaining} = $form->{creditlimit};
     $query = qq|
                 SELECT sum(used) FROM (
-		SELECT SUM((amount - paid) * coalesce(e.$buysell, 1)) as used
+		SELECT SUM(amount - paid) as used
 		  FROM $arap
-             LEFT JOIN exchangerate e ON $arap.transdate = e.transdate
 		 WHERE entity_credit_account = ?
                  UNION 
                 SELECT sum(o.amount * coalesce(e.$buysell, 1)) as used

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