<BR><FORM ACTION="search/cust_main.cgi" METHOD="POST">Credit card # <INPUT TYPE="hidden" NAME="card_on" VALUE="1"><INPUT TYPE="text" NAME="card"><INPUT TYPE="submit" VALUE="Search"></FORM>
<FORM ACTION="search/cust_bill.cgi" METHOD="POST">Invoice # <INPUT TYPE="text" NAME="invnum" SIZE="8"><INPUT TYPE="submit" VALUE="Search"></FORM>
<FORM ACTION="search/cust_pay.cgi" METHOD="POST">Check # <INPUT TYPE="text" NAME="payinfo" SIZE="8"><INPUT TYPE="hidden" NAME="payby" VALUE="BILL"><INPUT TYPE="submit" VALUE="Search"></FORM>
- <BR><A HREF="browse/cust_pay_batch.cgi">View pending credit card batch</A>
+ <BR><A HREF="browse/cust_pay_batch.cgi">View pending credit card batch</A> <BR><BR><A HREF="search/cust_pkg.html">Packages (by next bill date range)</A>
<BR><BR>Invoice reports
<UL>
<LI><a href="search/cust_bill_event.html">Invoice event errors (failed credit cards)</a>
<UL>
<LI><A HREF="search/cust_pkg.cgi?pkgnum">packages (by package number)</A>
<LI><A HREF="search/cust_pkg.cgi?APKG_pkgnum">packages with unconfigured services (by package number)</A>
+ <LI><A HREF="search/cust_pkg.html">packages (by next bill date range)</A>
</UL>
Invoices
<UL>
if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) {
$sortby=\*bill_sort;
- my($beginning, $ending) = (0, 0);
my $range = '';
if ( $cgi->param('beginning')
&& $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) {
my $beginning = str2time($1);
$range = " WHERE bill >= $beginning ";
- } elsif ( $cgi->param('ending')
+ }
+ if ( $cgi->param('ending')
&& $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) {
- $ending = str2time($1) + 86400;
+ my $ending = str2time($1) + 86400;
$range .= ( $range ? ' AND ' : ' WHERE ' ). " bill <= $ending ";
}
#false laziness with below
my $statement = "SELECT COUNT(*) FROM cust_pkg $range";
+ warn $statement;
my $sth = dbh->prepare($statement)
or die dbh->errstr. " doing $statement";
$sth->execute or die "Error executing \"$statement\": ". $sth->errstr;