global editing ist falsch.
[kivitendo-erp.git] / bin / mozilla / ct.pl
index c2d3b90..10b138e 100644 (file)
@@ -285,11 +285,12 @@ sub form_header {
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
 
-  $form->get_lists(employees      => "ALL_EMPLOYEES",
-                   taxzones       => "ALL_TAXZONES",
-                   business_types => { key => 'ALL_SALESMAN_BUSINESSES', salesman => 1 });
+  $form->get_lists(employees => "ALL_EMPLOYEES",
+                   taxzones  => "ALL_TAXZONES");
   $form->get_pricegroup(\%myconfig, { all => 1 });
 
+  $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::vertreter;
+
   $form->{ALL_SALESMEN}   = $form->{ALL_EMPLOYEES};
   $form->{taxincluded}    = ($form->{taxincluded}) ? "checked" : "";
   $form->{is_admin}       = $myconfig{role} eq 'admin';
@@ -573,8 +574,9 @@ sub save {
   }
   # /saving the history
   &edit;
-  exit;
+
   $main::lxdebug->leave_sub();
+  ::end_of_request();
 }
 
 sub delete {
@@ -653,8 +655,7 @@ sub get_shipto {
   my %myconfig = %main::myconfig;
 
   CT->get_shipto(\%myconfig, \%$form);
-  print $form->ajax_response_header(),  join '__pjx__', map $form->{"shipto$_"},
-    qw(name department_1 department_2 street zipcode city country contact phone fax email used);
+  print $form->ajax_response_header(), join('__pjx__', map($form->{"shipto$_"}, qw(name department_1 department_2 street zipcode city country contact phone fax email used)));
   $main::lxdebug->leave_sub();
 
 }