summaryrefslogtreecommitdiff
path: root/LedgerSMB/IR.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/IR.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/IR.pm')
-rwxr-xr-xLedgerSMB/IR.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm
index 8523b870..714acf61 100755
--- a/LedgerSMB/IR.pm
+++ b/LedgerSMB/IR.pm
@@ -337,6 +337,7 @@ sub post_invoice {
my $totalqty = $form->{"qty_$i"};
while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref => $ref);
my $qty = $ref->{qty} + $ref->{allocated};
@@ -1034,6 +1035,7 @@ sub retrieve_invoice {
$sth->execute( $form->{id} ) || $form->dberror($query);
$ref = $sth->fetchrow_hashref(NAME_lc);
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
for ( keys %$ref ) {
$form->{$_} = $ref->{$_};
}
@@ -1093,6 +1095,7 @@ sub retrieve_invoice {
my $ptref;
while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
my ($dec) = ( $ref->{fxsellprice} =~ /\.(\d+)/ );
$dec = length $dec;
@@ -1103,6 +1106,7 @@ sub retrieve_invoice {
my $taxrate = 0;
while ( $ptref = $tth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth => $tth, hashref => $ptref);
$ref->{taxaccounts} .= "$ptref->{accno} ";
$taxrate += $form->{"$ptref->{accno}_rate"};
}
@@ -1215,6 +1219,7 @@ sub retrieve_item {
my $ptref;
while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
my ($dec) = ( $ref->{sellprice} =~ /\.(\d+)/ );
$dec = length $dec;
@@ -1277,7 +1282,9 @@ sub exchangerate_defaults {
# get exchange rates for transdate or max
foreach $var ( split /:/, substr( $form->{currencies}, 4 ) ) {
$eth1->execute( $var, $form->{transdate} );
- ( $form->{$var} ) = $eth1->fetchrow_array;
+ @array = $eth1->fetchrow_array;
+ $form->db_parse_numeric(sth=> $eth1, arrayref=>\@array);
+ $form->{$var} = shift @array;
if ( !$form->{$var} ) {
$eth2->execute($var);