diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-13 17:31:13 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-13 17:31:13 +0000 |
commit | a8dc4a184e190ab23e96a2bfe133c9aea6af019d (patch) | |
tree | 64309763fdac820dbdeca57f5506c80d8330dcc3 /bin | |
parent | 0dd0dab1bda350998569a4fcbf2e81f109e144a9 (diff) |
Round displayed values in till breakdown
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@214 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rc.pl | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -250,6 +250,7 @@ function money_round(m){ function custom_calc_total(){ |; my $subgen = 'document.forms[0].sub_sub.value = '; + my $toround = ''; foreach my $unit (@{$pos_config{'breakdown'}}) { # XXX Needs to take into account currencies that don't use 2 dp my $parsed = $form->parse_amount(\%pos_config, $unit); @@ -261,8 +262,12 @@ function custom_calc_total(){ document.forms[0].${subval}.value = document.forms[0].${calcval}.value * $parsed; |; $subgen .= "document.forms[0].${subval}.value * 1 + "; + $toround .= qq| + document.forms[0].${subval}.value = + money_round(document.forms[0].${subval}.value); |; } print $subgen . "0;"; + print $toround; print qq|document.forms[0].sub_sub.value = money_round(document.forms[0].sub_sub.value); document.forms[0].amount_cash.value = money_round( |