From 044d18fff505b6823db1e5093fef96577e420afa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 7 Dec 2010 12:01:15 +0100 Subject: [PATCH] =?utf8?q?Filterkriterium=20Kundentyp=20(business=5Fid)=20?= =?utf8?q?f=C3=BCr=20Rechnungs=C3=BCbersicht=20hinzugef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AR.pm | 5 +++++ bin/mozilla/ar.pl | 9 ++++++--- templates/webpages/ar/search.html | 21 ++++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/SL/AR.pm b/SL/AR.pm index fe3e4431b..11333cef0 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -446,6 +446,11 @@ sub ar_transactions { $where .= " AND c.name ILIKE ?"; push(@values, $form->like($form->{customer})); } + if ($form->{business_id}) { + my $business_id = $form->{business_id}; + $where .= " AND c.business_id = ?"; + push(@values, $business_id); + } if ($form->{department_id}) { my $department_id = $form->{department_id}; $where .= " AND a.department_id = ?"; diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 8efd498fa..6f0b738ac 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1275,9 +1275,12 @@ sub search { $form->{title} = $locale->text('AR Transactions'); $form->{jsscript} = 1; - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, - "departments" => "ALL_DEPARTMENTS", - "customers" => "ALL_VC"); + # Auch in Rechnungsübersicht nach Kundentyp filtern - jan + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, + "departments" => "ALL_DEPARTMENTS", + "customers" => "ALL_VC", + "business_types" => "ALL_BUSINESS_TYPES"); + $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; # constants and subs for template $form->{jsscript} = 1; diff --git a/templates/webpages/ar/search.html b/templates/webpages/ar/search.html index 9245d6b29..76a19933d 100644 --- a/templates/webpages/ar/search.html +++ b/templates/webpages/ar/search.html @@ -3,7 +3,7 @@
- +
@@ -72,6 +72,25 @@ -%] + [% IF SHOW_BUSINESS_TYPES %] + + + + + [% END %]
[% title %]
[% 'Customer type' | $T8 %] + [%- INCLUDE 'generic/multibox.html' + name = 'business_id', + style = "width: 250px", + DATA = ALL_BUSINESS_TYPES, + id_key = 'id', + label_key = 'description', + limit = vclimit, + show_empty = 1, + allow_textbox = 0, + -%] + + +
[% 'From' | $T8 %] -- 2.20.1