summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-07 18:17:35 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-07 18:17:35 +0000
commit8fc5f4138527ed74ae92afff279b17f80590e8f3 (patch)
tree74c47cd223b4a56c104d6d5416c743018e9f05d6 /LedgerSMB
parentf0479a682413c6ac9003c11dc6e59628d6298e7f (diff)
Fixing GL report query
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1534 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/GL.pm8
1 files changed, 4 insertions, 4 deletions
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|;