From 0c472ce6b2b803cd57b8361d778fb711dc3549ba Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 4 Apr 2007 09:37:16 +0000 Subject: [PATCH] =?utf8?q?Einen=20Filter=20f=C3=BCr=20den=20Kunden-/Liefer?= =?utf8?q?antentypen=20bei=20Berichten=20=C3=BCber=20Kunden-/Lieferantenst?= =?utf8?q?ammdaten=20implementiert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/CT.pm | 5 +++++ bin/mozilla/ct.pl | 28 +++++++++++++++++++++++++++- locale/de/all | 2 ++ locale/de/ct | 2 ++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/SL/CT.pm b/SL/CT.pm index 82e360cc7..ad92d4c34 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -630,6 +630,11 @@ sub search { $where .= qq| AND NOT obsolete|; } + if ($form->{business_id}) { + $where .= qq| AND (business_id = ?)|; + push(@values, conv_i($form->{business_id})); + } + my $query = qq|SELECT ct.*, b.description AS business | . qq|FROM $cv ct | . 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| | diff --git a/locale/de/all b/locale/de/all index 4377e9586..d6d032c05 100644 --- a/locale/de/all +++ b/locale/de/all @@ -308,6 +308,7 @@ aktualisieren wollen?', 'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.', 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!', 'Customer saved!' => 'Kunde gespeichert!', + 'Customer type' => 'Kundentyp', 'Customername' => 'Kundenname', 'Customernumberinit' => 'Kunden-/Lieferantennummernkreis', 'Customers' => 'Kunden', @@ -1159,6 +1160,7 @@ gestartet', 'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.', 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!', 'Vendor saved!' => 'Lieferant gespeichert!', + 'Vendor type' => 'Lieferantentyp', 'Vendors' => 'Lieferanten', 'Verrechnungseinheit' => 'Verrechnungseinheit', 'Version' => 'Version', diff --git a/locale/de/ct b/locale/de/ct index 1a1c150ca..5103aad55 100644 --- a/locale/de/ct +++ b/locale/de/ct @@ -26,6 +26,7 @@ $self->{texts} = { 'Customer Number' => 'Kundennummer', 'Customer deleted!' => 'Kunde gelöscht!', 'Customer saved!' => 'Kunde gespeichert!', + 'Customer type' => 'Kundentyp', 'Customers' => 'Kunden', 'DELETED' => 'Gelöscht', 'DUNNING STARTED' => 'DUNNING STARTED', @@ -134,6 +135,7 @@ $self->{texts} = { 'Vendor Number' => 'Lieferantennummer', 'Vendor deleted!' => 'Lieferant gelöscht!', 'Vendor saved!' => 'Lieferant gespeichert!', + 'Vendor type' => 'Lieferantentyp', 'Vendors' => 'Lieferanten', 'Zipcode' => 'PLZ', 'bin_list' => 'Lagerliste', -- 2.20.1