X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FPlugin%2FLxERP.pm;h=40bf195f205f2569b422ed92448fcf621e6c3f7b;hb=73a58f3dceeb378343ceb151942828eea686b75a;hp=8f3a9980dc4eecce184a5273eafd6e9aa77ed904;hpb=49b7cab6d1510010fac0345701ba8e46ea9b39a5;p=kivitendo-erp.git diff --git a/SL/Template/Plugin/LxERP.pm b/SL/Template/Plugin/LxERP.pm index 8f3a9980d..40bf195f2 100644 --- a/SL/Template/Plugin/LxERP.pm +++ b/SL/Template/Plugin/LxERP.pm @@ -42,6 +42,8 @@ sub format_amount_units { sub format_percent { my ($self, $var, $places, $skip_zero) = @_; + $places ||= 2; + return $self->format_amount($var * 100, $places, $skip_zero); } @@ -107,9 +109,8 @@ sub abs { } sub t8 { - my ($self, $text, $args) = @_; - $self->{locale} ||= Locale->new($::myconfig{countrycode}, 'all'); - return $self->{locale}->text($text, @args) || $text; + my ($self, $text, @args) = @_; + return $::locale->text($text, @args) || $text; } 1;