Einkaufsrechnung -> Suche. Fälligkeitsdatum als Suchfilter hinzugefügt
authorJan Büren <jan@kivitendo.de>
Sun, 17 Nov 2019 12:20:43 +0000 (13:20 +0100)
committerJan Büren <jan@kivitendo.de>
Sun, 17 Nov 2019 12:20:43 +0000 (13:20 +0100)
SL/AP.pm
templates/webpages/ap/search.html

index 1aa6a18..79b1fa8 100644 (file)
--- 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});
index 5b6eb3a..601cbb2 100644 (file)
        [% L.date_tag('transdateto') %]
      </td>
     </tr>
+     <tr>
+      <th align=right nowrap>[% 'Due Date' | $T8 %]</th>
+      <td>
+       [% L.date_tag('duedatefrom') %]
+       [% 'Bis' | $T8 %]
+       [% L.date_tag('duedateto') %]
+     </td>
+    </tr>
    <input type=hidden name=sort value=transdate>
    </table>
     </td>