diff options
author | ivan <ivan> | 2009-12-04 04:40:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-04 04:40:28 +0000 |
commit | cf49d3c860a2000cfc23a0e0db472a7d6fc58935 (patch) | |
tree | d3fa44471ab7c004f06c09ca71747b77992aa9ce /httemplate/search/report_svc_acct.html | |
parent | 051abf85ce0cad902a6c2b0d24a6f90d4e7c5147 (diff) |
customer-specific account report (and some small refactoring of method names to clash less), RT#6180
Diffstat (limited to 'httemplate/search/report_svc_acct.html')
-rwxr-xr-x | httemplate/search/report_svc_acct.html | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/httemplate/search/report_svc_acct.html b/httemplate/search/report_svc_acct.html index 59fd1f8b3..ee913c4f9 100755 --- a/httemplate/search/report_svc_acct.html +++ b/httemplate/search/report_svc_acct.html @@ -1,7 +1,8 @@ -<% include('/elements/header.html', 'Account Report' ) %> +<% include('/elements/header.html', $title ) %> <FORM ACTION="svc_acct.cgi" METHOD="GET"> <INPUT TYPE="hidden" NAME="magic" VALUE="advanced"> +<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>"> <TABLE BGCOLOR="#cccccc" CELLSPACING=0> @@ -9,19 +10,21 @@ <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH> </TR> +% unless ( $custnum ) { <% include( '/elements/tr-select-agent.html', 'curr_value' => scalar( $cgi->param('agentnum') ), 'disable_empty' => 0, ) %> +% # just this customer's domains? <% include( '/elements/tr-select-domain.html', 'element_name' => 'domsvc', 'curr_value' => scalar( $cgi->param('domsvc') ), 'disable_empty' => 0, ) %> - +% } <SCRIPT type="text/javascript"> function toggle(what) { @@ -92,7 +95,21 @@ <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('List packages'); + unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #? + +my $title = 'Account Report'; + +#false laziness w/report_cust_pkg.html +my $custnum = ''; +if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { + $custnum = $1; + my $cust_main = qsearchs({ + 'table' => 'cust_main', + 'hashref' => { 'custnum' => $custnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, + }) or die "unknown custnum $custnum"; + $title .= ': '. $cust_main->name; +} </%init> <%once> |