summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-10 23:31:38 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-10 23:31:38 +0000
commitbd57057f2d8b64ded0969ec9029c84b15e997c53 (patch)
tree74ec975f64b15c11967feee06e56a1722534c2db /LedgerSMB
parentd3dbe9ee10fbe5a2be9709f761455a381c5d12e4 (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')
-rwxr-xr-xLedgerSMB/CP.pm6
-rwxr-xr-xLedgerSMB/Form.pm1
-rwxr-xr-xLedgerSMB/GL.pm3
-rwxr-xr-xLedgerSMB/IS.pm4
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);