diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-07 18:49:03 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-07 18:49:03 +0000 |
commit | cfd99074f5fb0b24970bde9ba3f087cd4f210931 (patch) | |
tree | 0fdcc4a936281b21d635dd13baf10f81ac454cb2 /LedgerSMB | |
parent | 8fc5f4138527ed74ae92afff279b17f80590e8f3 (diff) |
Correcting the CA.pm query
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1535 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/CA.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/LedgerSMB/CA.pm b/LedgerSMB/CA.pm index 8ce44f6a..6adaf302 100644 --- a/LedgerSMB/CA.pm +++ b/LedgerSMB/CA.pm @@ -365,12 +365,12 @@ sub all_transactions { 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 @@ sub all_transactions { $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 |