X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FDeliveryPlan.pm;h=4a458638a8c9f74b2580155b16c69d639f03a9cd;hb=e7cbe943a8a891b714a81b0fae32adb0933cfe26;hp=6e6eed403ee1eaebaf58eb7999839b5269445fce;hpb=004b43a3e882c17eabb918c38ca51df3e2833121;p=kivitendo-erp.git diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 6e6eed403..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,11 @@ sub link_to { my $vc = $object->is_sales ? 'customer' : 'vendor'; my $id = $object->id; - return "oe.pl?action=$action&type=$type&vc=$vc&id=$id"; + 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"; + } } if ($object->isa('SL::DB::Part')) { my $id = $object->id;