summaryrefslogtreecommitdiff
path: root/htdocs/search
diff options
context:
space:
mode:
authorivan <ivan>1999-01-18 09:22:42 +0000
committerivan <ivan>1999-01-18 09:22:42 +0000
commitc93520accf00e15095e7af5fcb59caed2bd9e556 (patch)
tree0fb501a33e9b55ba467a0a516ad1d90363342a83 /htdocs/search
parente74e6d0896eae348d54dbd6e436f37a2a0e69389 (diff)
changes to track email addresses for email invoicing
Diffstat (limited to 'htdocs/search')
-rwxr-xr-xhtdocs/search/cust_pkg.cgi27
-rwxr-xr-xhtdocs/search/svc_acct.cgi17
2 files changed, 19 insertions, 25 deletions
diff --git a/htdocs/search/cust_pkg.cgi b/htdocs/search/cust_pkg.cgi
index d1db3747a..c198a56b6 100755
--- a/htdocs/search/cust_pkg.cgi
+++ b/htdocs/search/cust_pkg.cgi
@@ -1,11 +1,14 @@
#!/usr/bin/perl -Tw
#
-# $Id: cust_pkg.cgi,v 1.3 1998-12-23 03:05:59 ivan Exp $
+# $Id: cust_pkg.cgi,v 1.4 1999-01-18 09:22:33 ivan Exp $
#
# based on search/svc_acct.cgi ivan@sisd.com 98-jul-17
#
# $Log: cust_pkg.cgi,v $
-# Revision 1.3 1998-12-23 03:05:59 ivan
+# Revision 1.4 1999-01-18 09:22:33 ivan
+# changes to track email addresses for email invoicing
+#
+# Revision 1.3 1998/12/23 03:05:59 ivan
# $cgi->keywords instead of $cgi->query_string
#
# Revision 1.2 1998/12/17 09:41:09 ivan
@@ -65,8 +68,7 @@ if ( scalar(@cust_pkg) == 1 ) {
exit;
} else {
my($total)=scalar(@cust_pkg);
- CGI::Base::SendHeaders(); # one guess
- print header('Package Search Results',''), <<END;
+ print $cgi->header, header('Package Search Results',''), <<END;
$total matching packages found
<TABLE BORDER=4 CELLSPACING=0 CELLPADDING=0>
<TR>
@@ -77,8 +79,6 @@ if ( scalar(@cust_pkg) == 1 ) {
</TR>
END
- my($lines)=16;
- my($lcount)=$lines;
my(%saw,$cust_pkg);
foreach $cust_pkg (
sort $sortby grep(!$saw{$_->pkgnum}++, @cust_pkg)
@@ -98,20 +98,7 @@ END
<TD><FONT SIZE=-1>$company</FONT></TD>
</TR>
END
- if ($lcount-- == 0) { # lots of little tables instead of one big one
- $lcount=$lines;
- print <<END;
- </TABLE>
- <TABLE BORDER=4 CELLSPACING=0 CELLPADDING=0>
- <TR>
- <TH>Package #</TH>
- <TH>Customer #</TH>
- <TH>Name</TH>
- <TH>Company</TH>
- <TH>
- </TR>
-END
- }
+
}
print <<END;
diff --git a/htdocs/search/svc_acct.cgi b/htdocs/search/svc_acct.cgi
index 0afdb1a26..75fbcb9b7 100755
--- a/htdocs/search/svc_acct.cgi
+++ b/htdocs/search/svc_acct.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: svc_acct.cgi,v 1.3 1998-12-23 03:06:28 ivan Exp $
+# $Id: svc_acct.cgi,v 1.4 1999-01-18 09:22:34 ivan Exp $
#
# Usage: post form to:
# http://server.name/path/svc_acct.cgi
@@ -23,7 +23,10 @@
# give service and customer info too ivan@sisd.com 98-aug-16
#
# $Log: svc_acct.cgi,v $
-# Revision 1.3 1998-12-23 03:06:28 ivan
+# Revision 1.4 1999-01-18 09:22:34 ivan
+# changes to track email addresses for email invoicing
+#
+# Revision 1.3 1998/12/23 03:06:28 ivan
# $cgi->keywords instead of $cgi->query_string
#
# Revision 1.2 1998/12/17 09:41:10 ivan
@@ -36,6 +39,8 @@ use CGI::Carp qw(fatalsToBrowser);
use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header idiot popurl);
+use FS::svc_acct;
+use FS::cust_main;
my($cgi)=new CGI;
&cgisuidsetup($cgi);
@@ -43,6 +48,7 @@ my($cgi)=new CGI;
my(@svc_acct,$sortby);
my($query)=$cgi->keywords;
+$query ||= ''; #to avoid use of unitialized value errors
#this tree is a little bit redundant
if ( $query eq 'svcnum' ) {
$sortby=\*svcnum_sort;
@@ -84,7 +90,7 @@ if ( scalar(@svc_acct) == 1 ) {
exit;
} else {
my($total)=scalar(@svc_acct);
- print $cgi->header("Account Search Results",''), <<END;
+ print $cgi->header, header("Account Search Results",''), <<END;
$total matching accounts found
<TABLE BORDER=4 CELLSPACING=0 CELLPADDING=0>
<TR>
@@ -128,7 +134,8 @@ END
? "<A HREF=\"${p}view/cust_main.cgi?$custnum\"><FONT SIZE=-1>$custnum</FONT></A>"
: "<I>(unlinked)</I>"
;
- my($pname) = $custnum ? "$last, $first" : '';
+ my($pname) = $custnum ? "<A HREF=\"${p}view/cust_main.cgi?$custnum\">$last, $first</A>" : '';
+ my $pcompany = $custnum ? "<A HREF=\"${p}view/cust_main.cgi?$custnum\">$company</A>" : '';
print <<END;
<TR>
<TD><A HREF="${p}view/svc_acct.cgi?$svcnum"><FONT SIZE=-1>$svcnum</FONT></A></TD>
@@ -137,7 +144,7 @@ END
<TD><FONT SIZE=-1>$svc</FONT></TH>
<TD><FONT SIZE=-1>$pcustnum</FONT></TH>
<TD><FONT SIZE=-1>$pname<FONT></TH>
- <TD><FONT SIZE=-1>$company</FONT></TH>
+ <TD><FONT SIZE=-1>$pcompany</FONT></TH>
</TR>
END