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

SF.net SVN: ledger-smb:[3619] trunk/LedgerSMB/AM.pm



Revision: 3619
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3619&view=rev
Author:   ehuelsmann
Date:     2011-08-03 20:56:46 +0000 (Wed, 03 Aug 2011)

Log Message:
-----------
Fix column names no longer available in 1.3 database model.

Modified Paths:
--------------
    trunk/LedgerSMB/AM.pm

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2011-08-03 20:53:20 UTC (rev 3618)
+++ trunk/LedgerSMB/AM.pm	2011-08-03 20:56:46 UTC (rev 3619)
@@ -1362,7 +1362,15 @@
 		          ar.duedate - ar.transdate AS overdue,
 		          ar.datepaid - ar.transdate AS paid,
 		          oe.reqdate - oe.transdate AS req,
-		          oe.id AS oeid, oe.customer_id, oe.vendor_id
+		          oe.id AS oeid,
+                          CASE oe.oe_class_id
+                             WHEN 1 THEN oe.entity_credit_account
+                             ELSE NULL
+                             END AS customer_id,
+                          CASE oe.oe_class_id
+                             WHEN 2 THEN oe.entity_credit_account
+                             ELSE NULL
+                             END AS vendor_id
 		     FROM recurring s
 		LEFT JOIN ar ON (ar.id = s.id)
 		LEFT JOIN ap ON (ap.id = s.id)


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