X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fct.pl;h=de231974aaf68f0530ec8e1be7390263243b551a;hb=1387c8c3ae668f43cafc8b81f51f7952b42db262;hp=fc260c6da819dd0c7c68b184f2fe978d00e8c101;hpb=8e58d69a5a65f4887c7722dfae72a658b883eeec;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index fc260c6da..de231974a 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -38,6 +38,11 @@ # $locale->text('Add Vendor') use SL::CT; +use CGI::Ajax; +use CGI; +use Data::Dumper; + +require "bin/mozilla/common.pl"; 1; @@ -52,7 +57,7 @@ sub add { "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; - CT->taxaccounts(\%myconfig, \%$form); + CT->populate_drop_down_boxes(\%myconfig, \%$form); &form_header; &form_footer; @@ -63,15 +68,157 @@ sub add { sub search { $lxdebug->enter_sub(); + my $vc_business_type = $form->{db} eq "customer" ? + $locale->text("Customer type") : $locale->text("Vendor type"); + + $form->get_lists("business_types" => "ALL_BUSINESS_TYPES"); + my (%labels, @values); + + my $business_types; + if (scalar(@{ $form->{ALL_BUSINESS_TYPES} }) != 0) { + push(@values, undef); + foreach my $item (@{ $form->{ALL_BUSINESS_TYPES} }) { + push(@values, $item->{id}); + $labels{$item->{id}} = $item->{description}; + } + + $business_types = + qq|