From 93b41545c84770c2a4376ee31cdad361678131fe Mon Sep 17 00:00:00 2001 From: tetragon Date: Mon, 8 Oct 2007 21:31:51 +0000 Subject: Scoping adjustment and fixing 1809384 git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1721 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 4f73ea72..2d1db311 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1769,14 +1769,14 @@ sub get_exchangerate { my $query = qq| SELECT $fld FROM exchangerate WHERE curr = ? AND transdate = ?|; - $sth = $self->{dbh}->prepare($query); + my $sth = $self->{dbh}->prepare($query); $sth->execute( $curr, $transdate ); ($exchangerate) = $sth->fetchrow_array; $exchangerate = Math::BigFloat->new($exchangerate); + $sth->finish; } - $sth->finish; $self->{dbh}->commit; $exchangerate; } -- cgit v1.2.3