summaryrefslogtreecommitdiff
path: root/bin/jc.pl
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-08-28 18:03:40 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-08-28 18:03:40 +0000
commit48f53d311fa339b62a6d9fd38f7f134b7806f6c6 (patch)
tree1b730cf388e024b7a4bbdfc969b61c7fd7a1d716 /bin/jc.pl
parent3eaf59635373ddf7d9df19316c96ffc45cc8b302 (diff)
Improve handling of the number format 1.000,00 by timecards
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1472 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/jc.pl')
-rwxr-xr-xbin/jc.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/jc.pl b/bin/jc.pl
index d466a78f..82a2992b 100755
--- a/bin/jc.pl
+++ b/bin/jc.pl
@@ -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->{$_} );