X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=e5ba1ddf8ff48d4fe44667b360a374b20a20699b;hb=0b280f98054da74f79cbc9fdb3e9f4c23326be53;hp=09068dce4ad72353d2ddc1f5d1abda7615778ce1;hpb=5b9f9bd6fc967ee0978be32dbe50414af0e55bb1;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 09068dce4..e5ba1ddf8 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; @@ -49,10 +54,10 @@ sub add { $form->{title} = "Add"; $form->{callback} = - "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}" + "$form->{script}?action=add&db=$form->{db}&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,156 @@ 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|