From 95a1a1bc48022d7c199bfd63f3f5069686a6d934 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 18 Jan 2008 05:10:19 +0000 Subject: Correcting join projection issues in AP/Outstanding report git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2050 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/AA.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 7b9da818..f75187ed 100644 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -722,6 +722,8 @@ sub delete_transaction { $rc; } +# This is going to get a little awkward because it involves delving into the +# acc_trans table in order to avoid catching unapproved payment vouchers. sub transactions { my ( $self, $myconfig, $form ) = @_; @@ -793,7 +795,7 @@ sub transactions { d.description AS department, a.ponumber $acc_trans_flds FROM $table a - JOIN entity_credit_account vc USING (entity_id) + JOIN entity_credit_account vc ON (a.entity_credit_account = vc.id) LEFT JOIN employee e ON (a.person_id = e.entity_id) LEFT JOIN employee m ON (e.manager_id = m.entity_id) JOIN entity ee ON (e.entity_id = ee.id) -- cgit v1.2.3