From 8fc5f4138527ed74ae92afff279b17f80590e8f3 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 7 Sep 2007 18:17:35 +0000 Subject: Fixing GL report query git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1534 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/GL.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm index e069c930..502bb0e9 100644 --- a/LedgerSMB/GL.pm +++ b/LedgerSMB/GL.pm @@ -425,28 +425,28 @@ sub all_transactions { 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|; -- cgit v1.2.3