X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=c2d3b9069ed1be5195c0233aebb9452fc4922e9f;hb=8f29628f54e8b6669cdefa6e43e2f54220760c3c;hp=c3d095533f1de2469f1cd6fc7da7f53579e025fb;hpb=b65a230d60e86d2c18a3ab7222379905aea5ecd7;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index c3d095533..c2d3b9069 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,8 +285,9 @@ 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", + business_types => { key => 'ALL_SALESMAN_BUSINESSES', salesman => 1 }); $form->get_pricegroup(\%myconfig, { all => 1 }); $form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES}; @@ -659,19 +660,19 @@ sub get_shipto { } sub get_delivery { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; - $main::auth->assert('customer_vendor_edit'); + $::auth->assert('customer_vendor_edit'); + $::auth->assert('sales_all_edit'); - my $form = $main::form; - my %myconfig = %main::myconfig; + CT->get_delivery(\%::myconfig, $::form ); - CT->get_delivery(\%myconfig, \%$form ); - $form->{IS_CUSTOMER} = $form->{db} eq 'customer'; - - print $form->ajax_response_header(), $form->parse_html_template('ct/get_delivery'); + print $::form->ajax_response_header, + $::form->parse_html_template('ct/get_delivery', { + is_customer => $::form->{db} eq 'customer', + }); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub delete_shipto {