From: Sven Schöling Date: Thu, 17 Sep 2015 12:22:48 +0000 (+0200) Subject: Rechnungen nach Fälligkeitsdatum sortieren X-Git-Tag: release-3.4.1~732 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e24e657067548d45e6a23ff56ee4c3ee69b5687b;p=kivitendo-erp.git Rechnungen nach Fälligkeitsdatum sortieren --- diff --git a/SL/AR.pm b/SL/AR.pm index 3ee8e0d92..2a80dc0a7 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -549,6 +549,14 @@ sub ar_transactions { $where .= " AND a.transdate <= ?"; push(@values, $form->{transdateto}); } + if ($form->{duedatefrom}) { + $where .= " AND a.duedate >= ?"; + push(@values, $form->{duedatefrom}); + } + if ($form->{duedateto}) { + $where .= " AND a.duedate <= ?"; + push(@values, $form->{duedateto}); + } if ($form->{open} || $form->{closed}) { unless ($form->{open} && $form->{closed}) { $where .= " AND a.amount <> a.paid" if ($form->{open}); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 7bcbe4c1e..88ace44fe 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -922,7 +922,7 @@ 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 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); push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables; $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); diff --git a/templates/webpages/ar/search.html b/templates/webpages/ar/search.html index b43630fad..5c56e624c 100644 --- a/templates/webpages/ar/search.html +++ b/templates/webpages/ar/search.html @@ -106,8 +106,9 @@ [% END %] - [% 'From' | $T8 %] + [% 'Invoice Date' | $T8 %] + [% 'From' | $T8 %] [% L.date_tag('transdatefrom') %] [% 'Bis' | $T8 %] @@ -115,6 +116,17 @@ [% L.date_tag('transdateto') %] + + [% 'Due Date' | $T8 %] + + [% 'From' | $T8 %] + [% L.date_tag('duedatefrom') %] + + [% 'Bis' | $T8 %] + + [% L.date_tag('duedateto') %] + + [%- IF CT_CUSTOM_VARIABLES.size %]