X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c3db1b36f46f3bb8fe278ad3320bc7b139278dc3..ed0754c2f82cab2e24100107b534692d5455b02d:/SL/Controller/DeliveryPlan.pm 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";