X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/984f6322b98c8d0cd3ceb9f659ed6621d180e617..c22e188b4d7aabd:/SL/Controller/DeliveryPlan.pm?ds=inline diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index aca991808..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";