X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pay.cgi;h=b5bdf82967771cacd7eb4e1e10463410adc4035d;hb=4201aaaae8a957bc98ce345d3ee0e599da354766;hp=68a17e7dc15314c95e9cce4c4bd03144faa3b568;hpb=92c43e05cdc7dc5c5a4f8d6b0017f7d699cda90d;p=freeside.git
diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi
index 68a17e7dc..b5bdf8296 100755
--- a/httemplate/search/cust_pay.cgi
+++ b/httemplate/search/cust_pay.cgi
@@ -1,38 +1,29 @@
<%
-#
-
-use strict;
-use vars qw( $cgi $sortby @cust_pay );
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use Date::Format;
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(popurl header menubar idiot table );
-use FS::Record qw(qsearch );
-use FS::cust_pay;
-use FS::cust_main;
-
-$cgi = new CGI;
-cgisuidsetup($cgi);
$cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo";
my $payinfo = $1;
$cgi->param('payby') =~ /^(\w+)$/ or die "illegal payby";
my $payby = $1;
-@cust_pay = qsearch('cust_pay', { 'payinfo' => $payinfo,
- 'payby' => $payby } );
-$sortby = \*date_sort;
+my @cust_pay = qsearch('cust_pay', { 'payinfo' => $payinfo,
+ 'payby' => $payby } );
+my $sortby = \*date_sort;
if (0) {
#if ( scalar(@cust_pay) == 1 ) {
# my $invnum = $cust_bill[0]->invnum;
# print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
} elsif ( scalar(@cust_pay) == 0 ) {
+%>
+
+<%
idiot("Check # not found.");
#exit;
} else {
my $total = scalar(@cust_pay);
my $s = $total > 1 ? 's' : '';
+%>
+
+<%
print header("Check # Search Results", menubar(
'Main Menu', popurl(2)
)), "$total matching check$s found
", &table(), <