X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=de231974aaf68f0530ec8e1be7390263243b551a;hb=1387c8c3ae668f43cafc8b81f51f7952b42db262;hp=4ad5c3bf8cdade070cb2d52e9b01a4eba2011a74;hpb=c7bffefd26718a316f989fefa780a7edd95444f9;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 4ad5c3bf8..de231974a 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -68,6 +68,31 @@ 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| + ${vc_business_type} + | + . NTI($cgi->popup_menu('-name' => 'business_id', '-values' => \@values, + '-labels' => \%labels)) + . qq| + +|; + } + $label = ucfirst $form->{db}; $form->{title} = $locale->text($label . "s"); @@ -104,6 +129,7 @@ sub search { | . $locale->text('E-mail') . qq| + $business_types  | @@ -150,7 +176,7 @@ sub search { | . $locale->text('SIC') . qq| | - . $locale->text('Type of Business') . qq| + . $vc_business_type . qq| |