]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/Chart.pm
TopQuickSearch: Bei CustomerVendor redirects immer db mitgeben
[mfinanz.git] / SL / Controller / Chart.pm
index 68c75bf0fcfd06687ea94ca80efd8686615c61ea..624a65b1da52324e90bbbf890aa5ff822752d2fa 100644 (file)
@@ -6,12 +6,11 @@ use parent qw(SL::Controller::Base);
 use Clone qw(clone);
 use SL::DB::Chart;
 use SL::Controller::Helper::GetModels;
-use SL::DB::Helper::Paginated;
 use SL::Locale::String qw(t8);
 use SL::JSON;
 
 use Rose::Object::MakeMethods::Generic (
-  'scalar --get_set_init' => [ qw(charts models chart) ],
+  'scalar --get_set_init' => [ qw(charts models chart filter) ],
 );
 
 sub action_ajax_autocomplete {
@@ -74,9 +73,8 @@ sub action_show {
     if (!$self->chart) {
       # TODO error
     } else {
-      require Rose::DB::Object::Helpers;
-        $chart_hash                     = $self->chart->as_tree;
-        $chart_hash->{displayable_name} = $self->chart->displayable_name;
+      $chart_hash                     = $self->chart->as_tree;
+      $chart_hash->{displayable_name} = $self->chart->displayable_name;
     }
 
     $self->render(\ SL::JSON::to_json($chart_hash), { layout => 0, type => 'json', process => 0 });
@@ -113,4 +111,6 @@ sub init_models {
   );
 }
 
+sub init_filter { $_[0]->models->filtered->laundered }
+
 1;