From: Moritz Bunkus Date: Tue, 8 May 2007 12:28:00 +0000 (+0000) Subject: Die Kunden-/Lieferantenfilterauswahl bei den Berichten war verschwunden. X-Git-Tag: release-2.4.3^2~361 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f5c1b2e1b8d2899f8beb17b65a93a652105272dd;p=kivitendo-erp.git Die Kunden-/Lieferantenfilterauswahl bei den Berichten war verschwunden. --- diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 0a2c93d8d..6fd5edd70 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -403,6 +403,7 @@ sub form_header { map({ push(@old_project_ids, $form->{"project_id_$_"}) if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); + my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; $form->get_lists("contacts" => "ALL_CONTACTS", "shipto" => "ALL_SHIPTO", "projects" => { "key" => "ALL_PROJECTS", @@ -411,11 +412,9 @@ sub form_header { "employees" => "ALL_SALESMEN", "taxzones" => "ALL_TAXZONES", "payments" => "ALL_PAYMENTS", - "currencies" => "ALL_CURRENCIES"); - ($form->{vc} eq "customer" - ? $form->get_lists("customers" => "ALL_CUSTOMERS") - : $form->get_lists("vendors" => "ALL_VENDORS")); - + "currencies" => "ALL_CURRENCIES", + $vc => "ALL_" . uc($vc)); + my %labels; my @values = (undef); foreach my $item (@{ $form->{"ALL_CONTACTS"} }) { @@ -435,7 +434,7 @@ sub form_header { $labels{$item->{"id"}} = $item->{name}.qq|--|.$item->{"id"}; } - my $vc = qq| + $vc = qq| {vc}"}) . qq|"> | . $locale->text(ucfirst($form->{vc})) . qq| | . @@ -1429,8 +1428,11 @@ sub search { |; } + my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", - "all" => 1 }); + "all" => 1 }, + $vc => "ALL_" . uc($vc)); my %labels = (); my @values = (""); @@ -1442,6 +1444,24 @@ sub search { NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values, '-labels' => \%labels)); + %labels = (); + @values = (""); + + foreach my $item (@{ $form->{($form->{vc} eq "customer" ? "ALL_CUSTOMERS" : "ALL_VENDORS")}}) { + push(@values, $item->{name}.qq|--|.$item->{"id"}); + $labels{$item->{"id"}} = $item->{name}.qq|--|.$item->{"id"}; + } + + my $vc_label = $form->{vc} eq "customer" ? $locale->text('Customer') : $locale->text('Vendor'); + $vc = + $myconfig{vclimit} <= scalar(@values) + ? qq|{vc}"}) . qq|" name="$form->{vc}">| + : NTI($cgi->popup_menu('-name' => "$form->{vc}", + '-default' => $form->{"old$form->{vc}"}, + '-onChange' => 'document.getElementById(\'update_button\').click();', + '-values' => \@values, + '-labels' => \%labels)); + $form->header; print qq| @@ -1458,7 +1478,8 @@ sub search { - $vc + + $department
$vc_label$vc