diff options
-rwxr-xr-x | LedgerSMB/JC.pm | 2 | ||||
-rwxr-xr-x | bin/jc.pl | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/LedgerSMB/JC.pm b/LedgerSMB/JC.pm index dbcf916c..2f3bf9dc 100755 --- a/LedgerSMB/JC.pm +++ b/LedgerSMB/JC.pm @@ -76,6 +76,7 @@ sub get_jcitems { || $form->dberror($query); $ref = $sth->fetchrow_hashref(NAME_lc); + $form->db_parse_numeric(sth=>$sth, hashref=>$ref); for ( keys %$ref ) { $form->{$_} = $ref->{$_} } $sth->finish; @@ -488,6 +489,7 @@ sub jcitems { $sth->execute($dateformat) || $form->dberror($query); while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) { + $form->db_parse_numeric(sth=>$sth, hashref=>$ref); $ref->{project} = ( $ref->{parts_id} ) ? "job" : "project"; $ref->{transdate} = $ref->{transdatea}; delete $ref->{transdatea}; @@ -40,6 +40,7 @@ #====================================================================== use LedgerSMB::JC; +use Math::BigFloat; 1; @@ -413,7 +414,7 @@ sub prepare_timecard { $form->{checkedin} = 0; } - $form->{clocked} = ( $form->{checkedout} - $form->{checkedin} ) / 3600; + $form->{clocked} = Math::BigFloat->new(( $form->{checkedout} - $form->{checkedin} ) / 3600); if ( $form->{clocked} ) { $form->{oldnoncharge} = $form->{clocked} - $form->{qty}; } @@ -1045,7 +1046,7 @@ sub update { $form->{checkedin} = 0; } - $form->{clocked} = ( $form->{checkedout} - $form->{checkedin} ) / 3600; + $form->{clocked} = Math::BigFloat->new(( $form->{checkedout} - $form->{checkedin} ) / 3600); for (qw(sellprice qty noncharge allocated)) { $form->{$_} = $form->parse_amount( \%myconfig, $form->{$_} ); |