X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FPlugin%2FLxERP.pm;h=40bf195f205f2569b422ed92448fcf621e6c3f7b;hb=1ec0f541eb70afb7b2058acf9d6847e6e6e21dff;hp=c26988beb3405c23580eee98a1a92d30a6e488f3;hpb=09fe7f33a735ecc3f4a3112ad716f674983b00cc;p=kivitendo-erp.git diff --git a/SL/Template/Plugin/LxERP.pm b/SL/Template/Plugin/LxERP.pm index c26988beb..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); } @@ -106,4 +108,9 @@ sub abs { return $var < 0 ? $var * -1 : $var; } +sub t8 { + my ($self, $text, @args) = @_; + return $::locale->text($text, @args) || $text; +} + 1;