From 9dde8344f2004346a0b8db1f764d3c998c555391 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 21 Aug 2008 23:30:49 +0000 Subject: Hiding notes with ledgersmb.css on top company div for now. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2298 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/CA.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/CA.pm b/LedgerSMB/CA.pm index 117d9d1e..169e6827 100644 --- a/LedgerSMB/CA.pm +++ b/LedgerSMB/CA.pm @@ -151,7 +151,6 @@ sub all_transactions { my $fromdate_where; my $todate_where; - ( $form->{fromdate}, $form->{todate} ) = $form->from_to( $form->{year}, $form->{month}, $form->{interval} ) if !$form->{fromdate} && !$form->{todate}; @@ -372,7 +371,6 @@ sub all_transactions { } } } - $sth = $dbh->prepare($query); $sth->execute(@queryargs); my @balance = $sth->fetchrow_array; @@ -385,7 +383,7 @@ sub all_transactions { $query = ""; $union = ""; - + foreach my $id (@id) { # get all transactions @@ -425,7 +423,9 @@ sub all_transactions { ac.source, a.till, ac.chart_id FROM ar a JOIN acc_trans ac ON (ac.trans_id = a.id) - JOIN entity e ON (a.entity_id = e.id) + JOIN entity_credit_account eca + ON (a.entity_credit_account = eca.id) + JOIN entity e ON (eca.entity_id = e.id) $dpt_join WHERE ac.chart_id = ? AND ($approved OR (a.approved AND ac.approved)) @@ -456,7 +456,9 @@ sub all_transactions { ac.source, a.till, ac.chart_id FROM ap a JOIN acc_trans ac ON (ac.trans_id = a.id) - JOIN entity e ON (a.entity_id = e.id) + JOIN entity_credit_account eca + ON (a.entity_credit_account = eca.id) + JOIN entity e ON (eca.entity_id = e.id) $dpt_join WHERE ac.chart_id = ? AND ($approved OR (a.approved AND ac.approved)) @@ -482,7 +484,6 @@ sub all_transactions { } $query .= qq| ORDER BY $sortorder |; - $sth = $dbh->prepare($query); $sth->execute(@queryargs) || $form->dberror($query); -- cgit v1.2.3