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 +++- lsmb-request.pl | 2 +- scripts/vouchers.pl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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) diff --git a/lsmb-request.pl b/lsmb-request.pl index a0de6115..ca59246e 100644 --- a/lsmb-request.pl +++ b/lsmb-request.pl @@ -36,7 +36,7 @@ eval { require "custom.pl"; }; $request = new LedgerSMB; $request->{action} = '__default' if (!$request->{action}); - +$request->debug({file => '/tmp/request'}); $ENV{SCRIPT_NAME} =~ m/([^\/\\]*.pl)\?*.*$/; $script = $1; $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} ) diff --git a/scripts/vouchers.pl b/scripts/vouchers.pl index ac0b111f..f3cc20cd 100644 --- a/scripts/vouchers.pl +++ b/scripts/vouchers.pl @@ -384,5 +384,5 @@ sub batch_delete { search_batch($request); } -eval { do "scripts/custom/vouchers.pl"}; +require "scripts/custom/vouchers.pl"; 1; -- cgit v1.2.3