summaryrefslogtreecommitdiff
path: root/LedgerSMB/RC.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-07 06:02:55 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-07 06:02:55 +0000
commit19b819c58c2bd54d1354c8004e680a40e9ae94ec (patch)
tree3b3a561235193818dad05bfe928b70ea651a3050 /LedgerSMB/RC.pm
parent1d4c913ccaf723b79d5a4dbd9fcbe9e4297ec9ad (diff)
Applying patch to bugs 1699718 and 1713439
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1146 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/RC.pm')
-rw-r--r--LedgerSMB/RC.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm
index a7aa1d1f..6ffc16bf 100644
--- 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} ) {