X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=3baa8799f09f70fb1a73e4cde5bf0328ce6c168f;hb=9d1e95b0eb88a54c083815ffd2db30227c2acf4a;hp=bbb90c2d6f2fd79a1ca692859715eba1258f29e3;hpb=15682dc47316fcc2deab66730045cd38afec001f;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index bbb90c2d6..3baa8799f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -205,7 +205,7 @@ sub order_links { $intnotes = $form->{intnotes}; # get customer / vendor - if ($form->{type} =~ /(purchase_order|request_quotation|receive_order)/) { + if ($form->{type} =~ /(purchase_order|request_quotation)/) { IR->get_vendor(\%myconfig, \%$form); #quote all_vendor Bug 133 @@ -214,7 +214,7 @@ sub order_links { } } - if ($form->{type} =~ /(sales|ship)_(order|quotation)/) { + if ($form->{type} =~ /sales_(order|quotation)/) { IS->get_customer(\%myconfig, \%$form); #quote all_vendor Bug 133 @@ -407,8 +407,15 @@ sub form_header { #quote select[customer|vendor] Bug 133 $form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"}); + 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"} }) { @@ -417,8 +424,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 = (""); @@ -431,10 +438,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"})); + $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate}); @@ -781,6 +799,10 @@ print qq| $openclosed $employee $ordnumber + + | . $locale->text('Project Number') . qq| + $globalprojectnumber + @@ -1109,8 +1131,6 @@ sub update { &check_name($form->{vc}); - &check_project; - $buysell = 'buy'; $buysell = 'sell' if ($form->{vc} eq 'vendor'); $form->{exchangerate} = $exchangerate @@ -1248,6 +1268,7 @@ sub search { $ordnumber = 'ordnumber'; $employee = $locale->text('Employee'); } + if ($form->{type} eq 'request_quotation') { $form->{title} = $locale->text('Request for Quotations'); $form->{vc} = 'vendor'; @@ -1255,13 +1276,7 @@ sub search { $ordnumber = 'quonumber'; $employee = $locale->text('Employee'); } - if ($form->{type} eq 'receive_order') { - $form->{title} = $locale->text('Receive Merchandise'); - $form->{vc} = 'vendor'; - $ordlabel = $locale->text('Order Number'); - $ordnumber = 'ordnumber'; - $employee = $locale->text('Employee'); - } + if ($form->{type} eq 'sales_order') { $form->{title} = $locale->text('Sales Orders'); $form->{vc} = 'customer'; @@ -1269,14 +1284,6 @@ sub search { $ordnumber = 'ordnumber'; $employee = $locale->text('Salesperson'); } - if ($form->{type} eq 'ship_order') { - $form->{title} = $locale->text('Ship Merchandise'); - $form->{vc} = 'customer'; - $ordlabel = $locale->text('Order Number'); - $ordnumber = 'ordnumber'; - $employee = $locale->text('Salesperson'); - - } if ($form->{type} eq 'sales_quotation') { $form->{title} = $locale->text('Quotations'); @@ -1286,30 +1293,6 @@ sub search { $employee = $locale->text('Employee'); } - if ($form->{type} =~ /(ship|receive)_order/) { - OE->get_warehouses(\%myconfig, \%$form); - - # warehouse - if (@{ $form->{all_warehouses} }) { - $form->{selectwarehouse} = "