X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=10b138e62e94cff123b101eff50239d3f4502d45;hb=0e6197ea79295e1a1232617ee4ed4ae99d8a0640;hp=b0f72b43a9d9b876f925ebc25b3d4f12b0d02363;hpb=37d1a0102c52284ab503391f4333545829d904af;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index b0f72b43a..10b138e62 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -156,7 +156,7 @@ sub list_names { my %column_defs = ( 'id' => { 'text' => $locale->text('ID'), }, "$form->{db}number" => { 'text' => $locale->text('Number'), }, - 'name' => { 'text' => $locale->text('Name'), }, + 'name' => { 'text' => $form->{IS_CUSTOMER} ? $::locale->text('Customer Name') : $::locale->text('Vendor Name'), }, 'contact' => { 'text' => $locale->text('Contact'), }, 'phone' => { 'text' => $locale->text('Phone'), }, 'fax' => { 'text' => $locale->text('Fax'), }, @@ -285,10 +285,12 @@ sub form_header { my %myconfig = %main::myconfig; my $locale = $main::locale; - $form->get_lists("employees" => "ALL_EMPLOYEES", - "taxzones" => "ALL_TAXZONES"); + $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'; @@ -572,8 +574,9 @@ sub save { } # /saving the history &edit; - exit; + $main::lxdebug->leave_sub(); + ::end_of_request(); } sub delete { @@ -652,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(); }