X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=f4556cf2cfbfc29baa774c3fb8ea4bf605317ffe;hb=ebef09a8bde1d401fc7b0d60cfe09393e9a84c0f;hp=3b298f13d8891c21fa14b93e25fcf246dd3f521d;hpb=82c784869fbfc8a746a0ee0662947f189f021993;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 3b298f13d..f4556cf2c 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -353,8 +353,15 @@ sub form_header { |; + 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", - "shipto" => "ALL_SHIPTO"); + "shipto" => "ALL_SHIPTO", + "projects" => { "key" => "ALL_PROJECTS", + "all" => 0, + "old_id" => \@old_project_ids }); my (%labels, @values); foreach my $item (@{ $form->{"ALL_CONTACTS"} }) { @@ -363,8 +370,8 @@ sub form_header { ($item->{"cp_abteilung"} ? " ($item->{cp_abteilung})" : ""); } my $contact = - $cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, - '-labels' => \%labels, '-default' => $form->{"cp_id"}); + NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, + '-labels' => \%labels, '-default' => $form->{"cp_id"})); %labels = (); @values = (""); @@ -377,10 +384,21 @@ sub form_header { my $shipto = qq| | . $locale->text('Shipping Address') . qq| | . - $cgi->popup_menu('-name' => 'shipto_id', '-values' => \@values, - '-labels' => \%labels, '-default' => $form->{"shipto_id"}) + NTI($cgi->popup_menu('-name' => 'shipto_id', '-values' => \@values, + '-labels' => \%labels, '-default' => $form->{"shipto_id"})) . qq||; + %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"})); + # set option selected foreach $item (qw(AR customer currency department employee)) { $form->{"select$item"} =~ s/ selected//; @@ -743,11 +761,7 @@ print qq| | . $locale->text('Project Number') . qq| - - - - - + $globalprojectnumber @@ -1167,8 +1181,6 @@ sub update { &check_name(customer); - &check_project; - $form->{exchangerate} = $exchangerate if ( $form->{forex} = (