From 612e3ebee1757bdc62db37fa348f028c36157ed4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 25 Apr 2016 15:01:34 +0200 Subject: [PATCH] Einkaufsrechnungen: Suche nach Artikelnummer/-beschreibung in Positionen --- SL/AP.pm | 27 +++++++++++++++++++++++++++ bin/mozilla/ap.pl | 5 ++++- templates/webpages/ap/search.html | 8 ++++++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index 9e108a1ca..92dc733ad 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -507,6 +507,33 @@ sub ap_transactions { } } + if ($form->{parts_partnumber}) { + $where .= <{parts_partnumber}); + } + + if ($form->{parts_description}) { + $where .= <{parts_description}); + } + if ($where) { substr($where, 0, 4, " WHERE "); $query .= $where; diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 1cf71d8ee..b3b111a65 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -903,7 +903,8 @@ sub ap_transactions { vendornumber country ustid taxzone payment_terms charts direct_debit); my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department); + push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department + parts_partnumber parts_description); my $href = build_std_url('action=ap_transactions', grep { $form->{$_} } @hidden_variables); @@ -959,6 +960,8 @@ sub ap_transactions { push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if ($form->{ordnumber}); push @options, $locale->text('Notes') . " : $form->{notes}" if ($form->{notes}); push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if ($form->{transaction_description}); + push @options, $locale->text('Part Description') . " : $form->{parts_description}" if $form->{parts_description}; + push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}" if $form->{parts_partnumber}; push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if ($form->{transdatefrom}); push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if ($form->{transdateto}); push @options, $locale->text('Open') if ($form->{open}); diff --git a/templates/webpages/ap/search.html b/templates/webpages/ap/search.html index ba2c11869..0f692448e 100644 --- a/templates/webpages/ap/search.html +++ b/templates/webpages/ap/search.html @@ -55,11 +55,13 @@ [% 'Notes' | $T8 %] - + + [% 'Part Description' | $T8 %] + [% 'Project Number' | $T8 %] - + [%- INCLUDE 'generic/multibox.html' name = 'project_id', style = "width: 250px", @@ -71,6 +73,8 @@ allow_textbox = 0, -%] + [% 'Part Number' | $T8 %] + [% 'From' | $T8 %] -- 2.20.1