X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3bb4190a48d58f5a598b659c27b9a5bf233aa54b..d4c5ff04f33e7fe29e079c4489c4126a7ea2493c:/SL/Controller/CustomerVendor.pm diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 0184cf203..6106a4a29 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -92,7 +92,11 @@ sub action_add { my ($self) = @_; $self->_pre_render(); - $self->{cv}->assign_attributes(hourly_rate => $::instance_conf->get_customer_hourly_rate) if $self->{cv}->is_customer; + + if ($self->{cv}->is_customer) { + $self->{cv}->assign_attributes(hourly_rate => $::instance_conf->get_customer_hourly_rate); + $self->{cv}->salesman_id(SL::DB::Manager::Employee->current->id) if !$::auth->assert('customer_vendor_all_edit', 1); + } $self->render( 'customer_vendor/form',