From: Jan Büren Date: Tue, 7 Dec 2010 11:01:15 +0000 (+0100) Subject: Filterkriterium Kundentyp (business_id) für Rechnungsübersicht hinzugefügt. X-Git-Tag: release-2.6.2beta1~79 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=044d18fff505b6823db1e5093fef96577e420afa;p=kivitendo-erp.git Filterkriterium Kundentyp (business_id) für Rechnungsübersicht hinzugefügt. --- 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 %]