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

SF.net SVN: ledger-smb: [1535] trunk/LedgerSMB/CA.pm



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

Log Message:
-----------
Correcting the CA.pm query

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

Modified: trunk/LedgerSMB/CA.pm
===================================================================
--- trunk/LedgerSMB/CA.pm	2007-09-07 18:17:35 UTC (rev 1534)
+++ trunk/LedgerSMB/CA.pm	2007-09-07 18:49:03 UTC (rev 1535)
@@ -365,12 +365,12 @@
 
 			UNION ALL
 
-			SELECT a.id, a.invnumber, c.name, ac.transdate,
+			SELECT a.id, a.invnumber, e.name, ac.transdate,
 			       a.invoice, ac.amount, 'ar' as module, ac.cleared,
 			       ac.source, a.till, ac.chart_id
 			  FROM ar a
 			  JOIN acc_trans ac ON (ac.trans_id = a.id)
-			  JOIN customer c USING (entity_id)
+			  JOIN entity e ON (a.entity_id = e.id)
 			$dpt_join
 			 WHERE ac.chart_id = ?
 			$fromdate_where
@@ -398,12 +398,12 @@
         $query .= qq|
 			 UNION ALL
 
-			SELECT a.id, a.invnumber, v.name, ac.transdate,
+			SELECT a.id, a.invnumber, e.name, ac.transdate,
 			       a.invoice, ac.amount, 'ap' as module, ac.cleared,
 			       ac.source, a.till, ac.chart_id
 			  FROM ap a
 			  JOIN acc_trans ac ON (ac.trans_id = a.id)
-			  JOIN vendor v ON (a.vendor_id = v.id)
+			  JOIN entity e ON (a.entity_id = e.id)
 			$dpt_join
 			 WHERE ac.chart_id = ?
 			$fromdate_where


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