diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-10 23:31:38 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-10 23:31:38 +0000 |
commit | bd57057f2d8b64ded0969ec9029c84b15e997c53 (patch) | |
tree | 74ec975f64b15c11967feee06e56a1722534c2db /LedgerSMB/CP.pm | |
parent | d3dbe9ee10fbe5a2be9709f761455a381c5d12e4 (diff) |
Adding a number of bugfixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1178 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/CP.pm')
-rwxr-xr-x | LedgerSMB/CP.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm index e7031353..18ab0bde 100755 --- a/LedgerSMB/CP.pm +++ b/LedgerSMB/CP.pm @@ -270,7 +270,7 @@ sub get_openinvoices { my $spoolfile; while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) { - + $form->db_parse_numeric(sth=>$sth, hashref=>$ref); # if this is a foreign currency transaction get exchangerate $ref->{exchangerate} = $form->get_exchangerate( $dbh, $ref->{curr}, $ref->{transdate}, @@ -394,7 +394,9 @@ sub post_payment { my $sth = $dbh->prepare($query); $sth->execute( $form->{currency}, $form->{"id_$i"} ); - my ($exchangerate) = $sth->fetchrow_array(); + my @exchange = $sth->fetchrow_array(); + $form->db_parse_numeric(sth=>$sth, arrayref=>\@exchange); + my $exchangerate = shift @exchange; $exchangerate = 1 unless $exchangerate; |