odds and ends
[freeside.git] / httemplate / search / cust_bill.html
index 16128d5..79c05dc 100755 (executable)
@@ -37,7 +37,7 @@
        $begin = str2time($1);
        push @where, "cust_bill._date >= $begin";
      }
-     if (  $cgi->param('ending')
+     if ( $cgi->param('ending')
            && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) {
        $end = str2time($1) + 86399;
        push @where, "cust_bill._date < $end";
        push @where, "cust_bill._date < $end";
      }
 
+     if ( $cgi->param('invnum_min') =~ /^\s*(\d+)\s*$/ ) {
+       push @where, "cust_bill.invnum >= $1";
+     }
+     if ( $cgi->param('invnum_max') =~ /^\s*(\d+)\s*$/ ) {
+       push @where, "cust_bill.invnum <= $1";
+     }
+
      if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
        $agentnum = $1;
        push @where, "cust_main.agentnum = $agentnum";