summaryrefslogtreecommitdiff
path: root/LedgerSMB/CP.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-24 03:15:55 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-24 03:15:55 +0000
commita8c675b5c7481a9f8a26462961e863bffde2cdeb (patch)
tree5436b45a1069bfe7db59f4e2dfc07656215720a1 /LedgerSMB/CP.pm
parent6e70663c6f44a527786859b6390a092dda33fed8 (diff)
Closing bug 1895526-- exchange rate double parse on check payments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@2078 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/CP.pm')
-rwxr-xr-xLedgerSMB/CP.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm
index abcf2fdd..20f5818b 100755
--- a/LedgerSMB/CP.pm
+++ b/LedgerSMB/CP.pm
@@ -664,7 +664,7 @@ sub post_payments {
# get exchangerate for original
$query = qq|
- SELECT $buysell
+ SELECT $buysell AS fx
FROM exchangerate e
JOIN $form->{arap} a
ON (a.transdate = e.transdate)
@@ -674,7 +674,9 @@ sub post_payments {
$sth = $dbh->prepare($query);
$sth->execute( $form->{currency}, $form->{"id_$i"} )
|| $form->dberror( $query, 'CP.pm', 671 );
- my ($exchangerate) = $sth->fetchrow_array;
+ my $ref = $sth->fetchrow_arrayref();
+ $form->db_parse_numeric(sth => $sth, arrayref => $ref);
+ my ($exchangerate) = @$ref;
$exchangerate ||= 1;