From d05e1443a5514d24bf0cfc6833c6f06d2adf6df7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 25 Apr 2016 14:58:39 +0200 Subject: [PATCH] Verkaufsrechnungen: Suche nach Artikelnummer/-beschreibung in Positionen --- SL/AR.pm | 27 +++++++++++++++++++++++++++ bin/mozilla/ar.pl | 9 ++++++++- templates/webpages/ar/search.html | 8 ++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/SL/AR.pm b/SL/AR.pm index d37b7fc75..67a43d004 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -584,6 +584,33 @@ sub ar_transactions { } }; + if ($form->{parts_partnumber}) { + $where .= <{parts_partnumber}); + } + + if ($form->{parts_description}) { + $where .= <{parts_description}); + } + my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', 'trans_id_field' => 'c.id', 'filter' => $form, diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e051b17a7..444f7f92a 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -943,7 +943,8 @@ sub ar_transactions { push @columns, map { "cvar_$_->{name}" } @ct_includeable_custom_variables; my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto duedatefrom duedateto employee_id salesman_id business_id); + push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto duedatefrom duedateto + employee_id salesman_id business_id parts_partnumber parts_description); push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables; $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); @@ -1039,6 +1040,12 @@ sub ar_transactions { if ($form->{transaction_description}) { push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; } + if ($form->{parts_partnumber}) { + push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}"; + } + if ($form->{parts_description}) { + push @options, $locale->text('Part Description') . " : $form->{parts_description}"; + } if ($form->{transdatefrom}) { push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1); } diff --git a/templates/webpages/ar/search.html b/templates/webpages/ar/search.html index 7d3158ee0..5caec9f17 100644 --- a/templates/webpages/ar/search.html +++ b/templates/webpages/ar/search.html @@ -67,11 +67,15 @@ [% 'Transaction description' | $T8 %] - + + [% 'Part Description' | $T8 %] + [% 'Notes' | $T8 %] - + + [% 'Part Number' | $T8 %] + [% 'Project Number' | $T8 %] -- 2.20.1