From 548754580af9ad52ed6d49dd4665d4888664d5fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 17 Nov 2019 13:20:43 +0100 Subject: [PATCH] =?utf8?q?Einkaufsrechnung=20->=20Suche.=20F=C3=A4lligkeit?= =?utf8?q?sdatum=20als=20Suchfilter=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AP.pm | 8 ++++++++ templates/webpages/ap/search.html | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/SL/AP.pm b/SL/AP.pm index 1aa6a18ff..79b1fa802 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -556,6 +556,14 @@ sub ap_transactions { $where .= " AND a.transdate <= ?"; push(@values, trim($form->{transdateto})); } + if ($form->{duedatefrom}) { + $where .= " AND a.duedate >= ?"; + push(@values, trim($form->{duedatefrom})); + } + if ($form->{duedateto}) { + $where .= " AND a.duedate <= ?"; + push(@values, trim($form->{duedateto})); + } if ($form->{open} || $form->{closed}) { unless ($form->{open} && $form->{closed}) { $where .= " AND a.amount <> a.paid" if ($form->{open}); diff --git a/templates/webpages/ap/search.html b/templates/webpages/ap/search.html index 5b6eb3a6a..601cbb2a2 100644 --- a/templates/webpages/ap/search.html +++ b/templates/webpages/ap/search.html @@ -49,6 +49,14 @@ [% L.date_tag('transdateto') %] + + [% 'Due Date' | $T8 %] + + [% L.date_tag('duedatefrom') %] + [% 'Bis' | $T8 %] + [% L.date_tag('duedateto') %] + + -- 2.20.1