+ my @old_project_ids = ($form->{"globalproject_id"});
+ map({ push(@old_project_ids, $form->{"project_id_$_"})
+ if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
+
+ $form->get_lists("contacts" => "ALL_CONTACTS",
+ "projects" => { "key" => "ALL_PROJECTS",
+ "all" => 0,
+ "old_id" => \@old_project_ids });
+
+ my %labels;
+ my @values = (undef);
+ foreach my $item (@{ $form->{"ALL_CONTACTS"} }) {
+ push(@values, $item->{"cp_id"});
+ $labels{$item->{"cp_id"}} = $item->{"cp_name"} .
+ ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : "");
+ }
+ my $contact =
+ NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values,
+ '-labels' => \%labels, '-default' => $form->{"cp_id"}));
+
+ %labels = ();
+ @values = ("");
+ foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
+ push(@values, $item->{"id"});
+ $labels{$item->{"id"}} = $item->{"projectnumber"};
+ }
+ my $globalprojectnumber =
+ NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values,
+ '-labels' => \%labels,
+ '-default' => $form->{"globalproject_id"}));
+
+ if (@{ $form->{TAXZONE} }) {
+ $form->{selecttaxzone} = "";
+ foreach $item (@{ $form->{TAXZONE} }) {
+ if ($item->{id} == $form->{taxzone_id}) {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id} selected>" . H($item->{description}) .
+ "</option>";
+ } else {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id}>" . H($item->{description}) . "</option>";
+ }
+
+ }
+ } else {
+ $form->{selecttaxzone} =~ s/ selected//g;
+ if ($form->{taxzone_id} ne "") {
+ $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/;
+ }
+ }
+
+ $taxzone = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
+ <input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
+ </tr>|;
+
+
+