diff options
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/CP.pm | 6 | ||||
-rwxr-xr-x | LedgerSMB/Form.pm | 1 | ||||
-rwxr-xr-x | LedgerSMB/GL.pm | 3 | ||||
-rwxr-xr-x | LedgerSMB/IS.pm | 4 |
4 files changed, 10 insertions, 4 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; diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 423da27d..dafeff19 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -2328,6 +2328,7 @@ sub create_links { # store amounts in {acc_trans}{$key} for multiple accounts while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) { + $self->db_parse_numeric(sth=>$sth, hashref=>$ref); $ref->{exchangerate} = $self->get_exchangerate( $dbh, $self->{currency}, $ref->{transdate}, $fld ); diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm index 2148050b..a3e10b8b 100755 --- a/LedgerSMB/GL.pm +++ b/LedgerSMB/GL.pm @@ -439,7 +439,7 @@ sub all_transactions { $sth->execute || $form->dberror($query); while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) { - + $form->db_parse_numeric(sth=>$sth, hashref=>$ref); # gl if ( $ref->{type} eq "gl" ) { $ref->{module} = "gl"; @@ -531,6 +531,7 @@ sub transaction { $sth->execute( $form->{id} ) || $form->dberror($query); while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) { + $form->db_parse_numeric(sth=>$sth, hashref=>$ref); if ( $ref->{fx_transaction} ) { $form->{transfer} = 1; diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index e04fb1cd..8368c986 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -101,6 +101,8 @@ sub invoice_details { # account numbers $pth->execute( $form->{"id_$i"} ); $ref = $pth->fetchrow_hashref(NAME_lc); + $form->db_parse_numeric(sth=>$pth, hashref=>$ref); + for ( keys %$ref ) { $form->{"${_}_$i"} = $ref->{$_} } $pth->finish; @@ -1307,7 +1309,7 @@ sub post_invoice { transdate, source, fx_transaction, cleared) VALUES (?, (SELECT id FROM chart - WHERE accno = >), + WHERE accno = ?), ?, ?, ?, '1', ?)|; $sth = $dbh->prepare($query); |