]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Helpers/AttrPercent.pm
Attribute Helper umgeschrieben.
[mfinanz.git] / SL / DB / Helpers / AttrPercent.pm
diff --git a/SL/DB/Helpers/AttrPercent.pm b/SL/DB/Helpers/AttrPercent.pm
deleted file mode 100644 (file)
index e4c44ae..0000000
+++ /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;