[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1721] branches/1.2/LedgerSMB/Form.pm



Revision: 1721
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1721&view=rev
Author:   tetragon
Date:     2007-10-08 14:31:51 -0700 (Mon, 08 Oct 2007)

Log Message:
-----------
Scoping adjustment and fixing 1809384

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-10-08 17:31:35 UTC (rev 1720)
+++ branches/1.2/LedgerSMB/Form.pm	2007-10-08 21:31:51 UTC (rev 1721)
@@ -1769,14 +1769,14 @@
         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;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.