From 0e9d0175f15e1de80c773e0f8b654340295ed025 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 27 Dec 2003 08:24:13 +0000 Subject: package reports by agent --- httemplate/search/cust_pkg.cgi | 6 +++++ httemplate/search/cust_pkg.html | 46 ----------------------------------- httemplate/search/cust_pkg_report.cgi | 17 ------------- 3 files changed, 6 insertions(+), 63 deletions(-) delete mode 100755 httemplate/search/cust_pkg.html (limited to 'httemplate/search') diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 74f584084..2e9dc5a22 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -35,6 +35,12 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { $range .= ( $range ? 'AND ' : ' WHERE ' ). '( cancel IS NULL OR cancel = 0 )'; + if ( $cgi->param('agentnum') =~ /^(\d+)$/ and $1 ) { + $range .= ( $range ? 'AND ' : ' WHERE ' ). + "$1 = ( SELECT agentnum FROM cust_main". + " WHERE cust_main.custnum = cust_pkg.custnum )"; + } + #false laziness with below my $statement = "SELECT COUNT(*) FROM cust_pkg $range"; warn $statement; diff --git a/httemplate/search/cust_pkg.html b/httemplate/search/cust_pkg.html deleted file mode 100755 index 0dad83a2a..000000000 --- a/httemplate/search/cust_pkg.html +++ /dev/null @@ -1,46 +0,0 @@ - - - Packages - - - - - - -

Packages

-
- - Return packages with next bill date:

- - - - - - - - - - - -
From:
m/d/y
To:
m/d/y
-
- -
- - - - diff --git a/httemplate/search/cust_pkg_report.cgi b/httemplate/search/cust_pkg_report.cgi index b31674540..0dad83a2a 100755 --- a/httemplate/search/cust_pkg_report.cgi +++ b/httemplate/search/cust_pkg_report.cgi @@ -36,23 +36,6 @@ }); -<% my %agent_search = dbdef->table('agent')->column('disabled') - ? ( 'disabled' => '' ) : (); - my @agents = qsearch( 'agent', \%agent_search ); - if ( scalar(@agents) == 1 ) { -%> - -<% } else { %> - - - Agent: - -- cgit v1.2.1