From 4a06c43348965e95ca77af5ac38f89fedefdc25f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 25 Apr 2016 15:05:19 +0200 Subject: [PATCH] Lieferscheine: Suche nach Artikelnummer/-beschreibung in Positionen --- SL/DO.pm | 27 +++++++++++++++++++++++++++ bin/mozilla/do.pl | 8 +++++++- templates/webpages/do/search.html | 8 ++++++-- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/SL/DO.pm b/SL/DO.pm index f73d0a394..f953b6bc5 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -180,6 +180,33 @@ sub transactions { push @values, conv_date($form->{insertdateto}); } + if ($form->{parts_partnumber}) { + push @where, <{parts_partnumber}); + } + + if ($form->{parts_description}) { + push @where, <{parts_description}); + } + if (@where) { $query .= " WHERE " . join(" AND ", map { "($_)" } @where); } diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index ee132035e..b5015e781 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -558,7 +558,7 @@ sub orders { my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber transaction_description transdatefrom transdateto reqdatefrom reqdateto - type vc employee_id salesman_id project_id + type vc employee_id salesman_id project_id parts_partnumber parts_description insertdatefrom insertdateto business_id); my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); @@ -629,6 +629,12 @@ sub orders { if ($form->{transaction_description}) { push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; } + if ($form->{parts_description}) { + push @options, $locale->text('Part Description') . " : $form->{parts_description}"; + } + if ($form->{parts_partnumber}) { + push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}"; + } if ( $form->{transdatefrom} or $form->{transdateto} ) { push @options, $locale->text('Delivery Order Date'); push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom}; diff --git a/templates/webpages/do/search.html b/templates/webpages/do/search.html index a5ecf752d..e7fdd3304 100644 --- a/templates/webpages/do/search.html +++ b/templates/webpages/do/search.html @@ -86,12 +86,14 @@ [% 'Transaction description' | $T8 %] - + + [% 'Part Description' | $T8 %] + [% 'Project Number' | $T8 %] - + + [% 'Part Number' | $T8 %] + -- 2.20.1