projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
981b670
)
Workaround für Rundungsfehler, die da heraus entstehen, dass keine $places beim Aufru...
author
Udo Spallek
<info@wissensvermittlung.com>
Thu, 22 Dec 2005 13:46:56 +0000
(13:46 +0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Thu, 22 Dec 2005 13:46:56 +0000
(13:46 +0000)
Lösung: Es wird auf die Anzahl der Stellen gerundet, die eingegeben wurde.
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
a0fa96a
..
c5a30bf
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-519,6
+519,12
@@
sub format_amount {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $amount, $places, $dash) = @_;
+
+ #Workaround for $format_amount calls without $places
+ if (!defined $places){
+ (my $dec) = ($amount =~ /\.(\d+)/);
+ $places = length $dec;
+ }
if ($places =~ /\d/) {
$amount = $self->round_amount($amount, $places);