diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-04-04 19:20:53 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-04-04 19:20:53 +0000 |
commit | 49be3522dbec4ac0e42e069c5d8ac3552bed1202 (patch) | |
tree | b0c5415f9d6305c116ed731b4a792723acc3cb4b | |
parent | 2712d387e93a1698243e04f9ec1ae42472cdbde9 (diff) |
Correcting join issue on GL reports.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2124 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/GL.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm index 7ed6ab4c..30688e8f 100644 --- a/LedgerSMB/GL.pm +++ b/LedgerSMB/GL.pm @@ -452,7 +452,8 @@ sub all_transactions { FROM ar a JOIN acc_trans ac ON (a.id = ac.trans_id) JOIN chart c ON (ac.chart_id = c.id) - JOIN entity e ON (a.entity_id = e.id) + JOIN entity_credit_account ec ON (a.entity_credit_account = ec.id) + JOIN entity e ON (ec.entity_id = e.id) LEFT JOIN department d ON (d.id = a.department_id) WHERE $arwhere AND (ac.chart_id = $chart_id OR @@ -471,7 +472,8 @@ sub all_transactions { FROM ap a JOIN acc_trans ac ON (a.id = ac.trans_id) JOIN chart c ON (ac.chart_id = c.id) - JOIN entity e ON (a.entity_id = e.id) + JOIN entity_credit_account ec ON (a.entity_credit_account = ec.id) + JOIN entity e ON (ec.entity_id = e.id) LEFT JOIN department d ON (d.id = a.department_id) WHERE $apwhere AND (ac.chart_id = $chart_id OR |