X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4aded4e8dae01257d3d835251b9ae7c2d7c8a767..78034f2431414b414d171b720bc0438635e19ae5:/SL/DB/Helpers/AttrPercent.pm diff --git a/SL/DB/Helpers/AttrPercent.pm b/SL/DB/Helpers/AttrPercent.pm deleted file mode 100644 index e4c44ae90..000000000 --- a/SL/DB/Helpers/AttrPercent.pm +++ /dev/null @@ -1,27 +0,0 @@ -package SL::DB::Helpers::AttrPercent; - -use strict; - -use Carp; -use English; - -sub define { - my $package = shift; - my $attribute = shift; - my %params = @_; - - $params{places} = 2 if !defined($params{places}); - - no strict 'refs'; - *{ $package . '::' . $attribute . '_as_percent' } = sub { - my ($self, $string) = @_; - - $self->$attribute($::form->parse_amount(\%::myconfig, $string) / 100) if @_ > 1; - - return $::form->format_amount(\%::myconfig, 100 * $self->$attribute, $params{places}); - }; - - return 1; -} - -1;