From: Jan Büren Date: Wed, 3 Dec 2014 19:15:18 +0000 (+0100) Subject: Lieferplan: all_businesses in init-methode ausgelagert X-Git-Tag: release-3.2.0beta~219 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e7c07dfd71ff0a74de729351627ca5b3a3833ec9;p=kivitendo-erp.git Lieferplan: all_businesses in init-methode ausgelagert kurzes feedback zum lieferplan: in der action alle business laden: der ganze punkt an den init_* sachen ist, dass mand as laden von nötigen daten aus der action rauskriegt --- diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 8d2417eb5..a69702f1b 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -13,7 +13,7 @@ use Carp; use Rose::Object::MakeMethods::Generic ( scalar => [ qw(db_args flat_filter) ], - 'scalar --get_set_init' => [ qw(models all_edit_right mode vc all_employees) ], + 'scalar --get_set_init' => [ qw(models all_edit_right mode vc all_employees all_businesses) ], ); __PACKAGE__->run_before(sub { $::auth->assert('delivery_plan'); }); @@ -40,7 +40,6 @@ sub action_list { $self->prepare_report; my $orderitems = $self->models->get; - $self->{all_businesses} = SL::DB::Manager::Business->get_all_sorted; $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); } @@ -306,6 +305,9 @@ sub init_mode { sub init_all_employees { return SL::DB::Manager::Employee->get_all_sorted; } +sub init_all_businesses { + return SL::DB::Manager::Business->get_all_sorted; +} sub link_to { my ($self, $object, %params) = @_;