Pflichtenhefte: falsche Klammerung
[kivitendo-erp.git] / SL / Controller / CustomerVendor.pm
index 3b6db29..f59fd07 100644 (file)
@@ -69,6 +69,7 @@ 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;
   $self->render(
     'customer_vendor/form',
     title => ($self->is_vendor() ? $::locale->text('Add Vendor') : $::locale->text('Add Customer')),
@@ -641,6 +642,7 @@ sub _instantiate_args {
     $self->{cv}->taxincluded_checked(undef);
   }
 
+  $self->{cv}->hourly_rate($::instance_conf->get_customer_hourly_rate) if $self->is_customer && !$self->{cv}->hourly_rate;
 
   foreach my $cvar (@{$self->{cv}->cvars_by_config()}) {
     my $value = $::form->{cv_cvars}->{$cvar->config->name};