summaryrefslogtreecommitdiff
path: root/LedgerSMB/RC.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-07 06:02:01 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-07 06:02:01 +0000
commitf8f327d55e2c3bb14286ca4ac796917449f8cd3f (patch)
tree1228ded4a91f756e4dda6a69924bd0b2de16c0d2 /LedgerSMB/RC.pm
parent882f13b82286fc92d15efaa0a88919bb8febee1a (diff)
Applying patch to bugs 1699718 and 1713439
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1145 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/RC.pm')
-rwxr-xr-xLedgerSMB/RC.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm
index a7aa1d1f..6ffc16bf 100755
--- a/LedgerSMB/RC.pm
+++ b/LedgerSMB/RC.pm
@@ -53,6 +53,7 @@ sub getposlines {
my $sth = $dbh->prepare($query);
$sth->execute( $pos_config{till_accno} ) || $form->dberror($query);
while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
push @{ $form->{TB} }, $ref;
}
$sth->finish;
@@ -64,6 +65,7 @@ sub getposlines {
my $sth = $dbh->prepare($query);
$sth->execute( $pos_config{till_accno} ) || $form->dberror($query);
my $ref = $sth->fetchrow_hashref(NAME_lc);
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
$form->{sum} = $ref->{sum};
$sth->finish;
}
@@ -101,6 +103,7 @@ sub getbalance {
my $sth = $dbh->prepare($query);
$sth->execute( $form->{accno} ) || $form->dberror($query);
my $ref = $sth->fetchrow_hashref(NAME_lc);
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
$form->{balance} = $ref->{balance};
}
@@ -162,7 +165,9 @@ sub payment_transactions {
WHERE ch.accno = ? $transdate $cleared |;
$sth = $dbh->prepare($query);
$sth->execute( $form->{accno} );
- ( $form->{beginningbalance} ) = $sth->fetchrow_array();
+ my @balancelist = $sth->fetchrow_array();
+ $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist);
+ ( $form->{beginningbalance} ) = @balancelist;
$query = qq|
SELECT sum(ac.amount)
@@ -173,7 +178,9 @@ sub payment_transactions {
$sth = $dbh->prepare($query);
$sth->execute( $form->{accno} );
- ( $form->{fx_balance} ) = $sth->fetchrow_array();
+ @balancelist = $sth->fetchrow_array();
+ $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist);
+ ( $form->{fx_balance} ) = @balancelist;
$transdate = "";
if ( $form->{todate} ) {
@@ -190,7 +197,9 @@ sub payment_transactions {
$sth = $dbh->prepare($query);
$sth->execute( $form->{accno} );
- ( $form->{endingbalance} ) = $sth->fetchrow_array();
+ @balancelist = $sth->fetchrow_array();
+ $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist);
+ ( $form->{endingbalance} ) = @balancelist;
# fx balance
$query = qq|
@@ -201,7 +210,9 @@ sub payment_transactions {
$sth = $dbh->prepare($query);
$sth->execute( $form->{accno} );
- ( $form->{fx_endingbalance} ) = $sth->fetchrow_array();
+ @balancelist = $sth->fetchrow_array();
+ $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist);
+ ( $form->{fx_endingbalance} ) = @balancelist;
$cleared = qq| AND ac.cleared = '0'| unless $form->{fromdate};
@@ -392,6 +403,7 @@ sub payment_transactions {
my $ref;
while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
if ( $form->{summary} ) {