X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FDeliveryPlan.pm;h=4a458638a8c9f74b2580155b16c69d639f03a9cd;hb=c4a682432dda2b3e3e9aea823dee83aa8e99f224;hp=95db7ff6a9a4c245ec097685fdc72385e282f9c7;hpb=c3db1b36f46f3bb8fe278ad3320bc7b139278dc3;p=kivitendo-erp.git diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 95db7ff6a..4a458638a 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -15,7 +15,6 @@ use SL::DBUtils (); use Carp; use Rose::Object::MakeMethods::Generic ( - scalar => [ qw(db_args flat_filter) ], 'scalar --get_set_init' => [ qw(models all_edit_right vc use_linked_items all_employees all_businesses all_departments) ], ); @@ -339,7 +338,7 @@ sub init_models { } sub init_all_edit_right { - $::auth->assert('sales_all_edit', 1) + return $_[0]->vc eq 'customer' ? $::auth->assert('sales_all_edit', 1) : $::auth->assert('purchase_all_edit', 1); } sub init_vc { return $::form->{vc} if ($::form->{vc} eq 'customer' || $::form->{vc} eq 'vendor') || croak "self (DeliveryPlan) has no vc defined"; @@ -369,7 +368,7 @@ sub link_to { my $vc = $object->is_sales ? 'customer' : 'vendor'; my $id = $object->id; - if ($::instance_conf->get_feature_experimental) { + if ($::instance_conf->get_feature_experimental_order) { return "controller.pl?action=Order/$action&type=$type&id=$id"; } else { return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";