From: Moritz Bunkus Date: Mon, 30 Sep 2013 13:10:30 +0000 (+0200) Subject: Lieferscheinbericht: Suchmöglichkeit nach Seriennummer X-Git-Tag: release-3.1.0beta1~64 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2e4e2ba959344a6db630b5b9e9c6f8b93c666fc2;p=kivitendo-erp.git Lieferscheinbericht: Suchmöglichkeit nach Seriennummer --- diff --git a/SL/DO.pm b/SL/DO.pm index 15f1c8d08..7d3a5e61d 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -130,6 +130,11 @@ sub transactions { push @where, ($form->{delivered} ? "" : "NOT ") . "COALESCE(dord.delivered, FALSE)"; } + if ($form->{serialnumber}) { + push @where, 'dord.id IN (SELECT doi.delivery_order_id FROM delivery_order_items doi WHERE doi.serialnumber LIKE ?)'; + push @values, '%' . $form->{serialnumber} . '%'; + } + if($form->{transdatefrom}) { push @where, qq|dord.transdate >= ?|; push @values, conv_date($form->{transdatefrom}); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index ae804c8f6..e40c6727c 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -507,7 +507,7 @@ sub orders { my $report = SL::ReportGenerator->new(\%myconfig, $form); my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber + push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber chargenumber transaction_description transdatefrom transdateto type vc employee_id salesman_id project_id); my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); @@ -565,6 +565,7 @@ sub orders { if ($form->{ordnumber}) { push @options, $locale->text('Order Number') . " : $form->{ordnumber}"; } + push @options, $locale->text('Serial Number') . " : $form->{serialnumber}" if $form->{serialnumber}; if ($form->{transaction_description}) { push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; } diff --git a/templates/webpages/do/search.html b/templates/webpages/do/search.html index 5bc2a192b..1f7dda684 100644 --- a/templates/webpages/do/search.html +++ b/templates/webpages/do/search.html @@ -98,6 +98,11 @@ + + [% 'Serial Number' | $T8 %] + + + [% 'From' | $T8 %]