]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/AR.pm
Rechnungen nach Fälligkeitsdatum sortieren
[kivitendo-erp.git] / SL / AR.pm
index 3ee8e0d92d0cbe5e8b6a2ab41710ec711f5e47a1..2a80dc0a775aca4c82f1ffd170851f79272ee12a 100644 (file)
--- 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});