From: Bernd Bleßmann Date: Fri, 8 Nov 2013 09:23:00 +0000 (+0100) Subject: Liefertermin im Lieferscheinbericht filterbar gemacht ... X-Git-Tag: release-3.1.0beta1~22^2~171 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=30645d2ca27d8eca6df47ce3c6c0216628ce3839;p=kivitendo-erp.git Liefertermin im Lieferscheinbericht filterbar gemacht ... ... und Datum in Lieferscheindatum umbenannt. --- diff --git a/SL/DO.pm b/SL/DO.pm index 7d3a5e61d..21f93d813 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -145,6 +145,16 @@ sub transactions { push @values, conv_date($form->{transdateto}); } + if($form->{reqdatefrom}) { + push @where, qq|dord.reqdate >= ?|; + push @values, conv_date($form->{reqdatefrom}); + } + + if($form->{reqdateto}) { + push @where, qq|dord.reqdate <= ?|; + push @values, conv_date($form->{reqdateto}); + } + if (@where) { $query .= " WHERE " . join(" AND ", map { "($_)" } @where); } diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 086c008e6..06b4c4ef1 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -508,13 +508,14 @@ 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 - transaction_description transdatefrom transdateto type vc employee_id salesman_id project_id); + transaction_description transdatefrom transdateto reqdatefrom reqdateto + type vc employee_id salesman_id project_id); my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); my %column_defs = ( 'ids' => { 'text' => '', }, - 'transdate' => { 'text' => $locale->text('Date'), }, + 'transdate' => { 'text' => $locale->text('Delivery Order Date'), }, 'reqdate' => { 'text' => $locale->text('Reqdate'), }, 'id' => { 'text' => $locale->text('ID'), }, 'donumber' => { 'text' => $locale->text('Delivery Order'), }, @@ -569,12 +570,16 @@ sub orders { if ($form->{transaction_description}) { push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; } - if ($form->{transdatefrom}) { - push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1); - } - if ($form->{transdateto}) { - push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1); - } + 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}; + push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if $form->{transdateto}; + }; + if ( $form->{reqdatefrom} or $form->{reqdateto} ) { + push @options, $locale->text('Reqdate'); + push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1) if $form->{reqdatefrom}; + push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{reqdateto}, 1) if $form->{reqdateto}; + }; if ($form->{open}) { push @options, $locale->text('Open'); } diff --git a/templates/webpages/do/search.html b/templates/webpages/do/search.html index 1f7dda684..95a2c8b85 100644 --- a/templates/webpages/do/search.html +++ b/templates/webpages/do/search.html @@ -104,7 +104,7 @@ - [% 'From' | $T8 %] + [% 'Delivery Order Date' | $T8 %] [% 'From' | $T8 %] [% L.date_tag('transdatefrom') %] @@ -114,6 +114,17 @@ + + [% 'Reqdate' | $T8 %] [% 'From' | $T8 %] + + [% L.date_tag('reqdatefrom') %] + + [% 'Bis' | $T8 %] + + [% L.date_tag('reqdateto') %] + + + [% 'Include in Report' | $T8 %] @@ -166,7 +177,7 @@ - +