X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/37a84d92f0b0981aa6a8b9ec249baad97f4c0a5f..e14cb525c640cb15bb6b2dfb62ccebbe78cb45cd:/SL/Template/Plugin/LxERP.pm diff --git a/SL/Template/Plugin/LxERP.pm b/SL/Template/Plugin/LxERP.pm index df6cb6ad6..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 || [] }); + my ($self, $text, @args) = @_; + return $::locale->text($text, @args) || $text; } 1;