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

SF.net SVN: ledger-smb: [1534] trunk/LedgerSMB/GL.pm



Revision: 1534
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1534&view=rev
Author:   einhverfr
Date:     2007-09-07 11:17:35 -0700 (Fri, 07 Sep 2007)

Log Message:
-----------
Fixing GL report query

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

Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm	2007-09-07 18:04:52 UTC (rev 1533)
+++ trunk/LedgerSMB/GL.pm	2007-09-07 18:17:35 UTC (rev 1534)
@@ -425,28 +425,28 @@
 					UNION ALL
 
 				   SELECT a.id, 'ar' AS type, a.invoice, a.invnumber,
-						  ct.name, ac.transdate, ac.source,
+						  e.name, ac.transdate, ac.source,
 						  ac.amount, c.accno, c.gifi_accno, a.notes, c.link,
 						  a.till, ac.cleared, d.description AS department,
 						  ac.memo, c.description AS accname
 					 FROM ar a
 					 JOIN acc_trans ac ON (a.id = ac.trans_id)
 					 JOIN chart c ON (ac.chart_id = c.id)
-					 JOIN customer ct USING (entity_id)
+					 JOIN entity e ON (a.entity_id = e.id)
 				LEFT JOIN department d ON (d.id = a.department_id)
 					WHERE $arwhere
 
 				UNION ALL
 
 				   SELECT a.id, 'ap' AS type, a.invoice, a.invnumber,
-						  ct.name, ac.transdate, ac.source,
+						  e.name, ac.transdate, ac.source,
 						  ac.amount, c.accno, c.gifi_accno, a.notes, c.link,
 						  a.till, ac.cleared, d.description AS department,
 						  ac.memo, c.description AS accname
 					 FROM ap a
 					 JOIN acc_trans ac ON (a.id = ac.trans_id)
 					 JOIN chart c ON (ac.chart_id = c.id)
-					 JOIN vendor ct ON (a.vendor_id = ct.id)
+					 JOIN entity e ON (a.entity_id = e.id)
 				LEFT JOIN department d ON (d.id = a.department_id)
 					WHERE $apwhere
 				 ORDER BY $sortorder|;


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