$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";