X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/34366eda748e1198b8b2ead0c3fffd8edba9f23d..b68c23bf6e98cf678081dcaa84a8593b10aaff29:/SL/Template/Plugin/LxERP.pm diff --git a/SL/Template/Plugin/LxERP.pm b/SL/Template/Plugin/LxERP.pm index d1d93d13c..c26988beb 100644 --- a/SL/Template/Plugin/LxERP.pm +++ b/SL/Template/Plugin/LxERP.pm @@ -7,6 +7,8 @@ use List::Util qw(min); use SL::AM; +use strict; + sub new { my $class = shift; my $context = shift; @@ -21,6 +23,13 @@ sub format_amount { return ''; } +sub round_amount { + my ($self, $var, $places, $skip_zero) = @_; + + return $main::form->round_amount($var * 1, $places) unless $skip_zero && $var == 0; + return ''; +} + sub format_amount_units { my ($self, $amount, $amount_unit, $part_unit) = @_; @@ -90,4 +99,11 @@ sub turn90 { } } +sub abs { + my $self = shift; + my $var = shift; + + return $var < 0 ? $var * -1 : $var; +} + 1;