X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/58e28ca02c1fe93ff9db9024318d3529715bd8fb..41a1b801:/SL/Controller/CustomerVendor.pm diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 2d373c1d0..085b6d185 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -281,7 +281,7 @@ sub _transaction { my $db = $self->is_vendor() ? 'vendor' : 'customer'; my $action = 'add'; - if ($::instance_conf->get_feature_experimental && 'oe.pl' eq $script) { + if ($::instance_conf->get_feature_experimental_order && 'oe.pl' eq $script) { $script = 'controller.pl'; $action = 'Order/' . $action; } @@ -585,13 +585,17 @@ sub action_ajaj_get_contact { } qw( id gender abteilung title position givenname name email phone1 phone2 fax mobile1 mobile2 - satphone satfax project street zipcode city privatphone privatemail birthday + satphone satfax project street zipcode city privatphone privatemail birthday main ) ) }; $data->{contact_cvars} = $self->_prepare_cvar_configs_for_ajaj($self->{contact}->cvars_by_config); + # avoid two or more main_cp + my $has_main_cp = grep { $_->cp_main == 1 } @{ $self->{cv}->contacts }; + $data->{contact}->{disable_cp_main} = 1 if ($has_main_cp && !$data->{contact}->{cp_main}); + $self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 }); }