[freeside-commits] freeside/httemplate/search cust_pkg.cgi, 1.59, 1.59.2.1 report_cust_pkg.html, 1.14, 1.14.2.1
Ivan,,,
ivan at wavetail.420.am
Tue Oct 27 23:15:11 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv22871/httemplate/search
Modified Files:
Tag: FREESIDE_1_9_BRANCH
cust_pkg.cgi report_cust_pkg.html
Log Message:
customer link to package reports for that customer, RT#6180
Index: report_cust_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_pkg.html,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- report_cust_pkg.html 29 Jun 2009 13:53:25 -0000 1.14
+++ report_cust_pkg.html 28 Oct 2009 06:15:09 -0000 1.14.2.1
@@ -1,7 +1,8 @@
-<% include('/elements/header.html', 'Package Report' ) %>
+<% include('/elements/header.html', $title ) %>
<FORM ACTION="cust_pkg.cgi" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="bill">
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
@@ -11,11 +12,13 @@
</TH>
</TR>
+% unless ( $custnum ) {
<% include( '/elements/tr-select-agent.html',
'curr_value' => scalar( $cgi->param('agentnum') ),
'disable_empty' => 0,
)
%>
+% }
<% include( '/elements/tr-select-cust_pkg-status.html',
'onchange' => 'status_changed(this);',
@@ -155,6 +158,19 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List packages');
+my $title = 'Package Report';
+
+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>
Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pkg.cgi,v
retrieving revision 1.59
retrieving revision 1.59.2.1
diff -u -d -r1.59 -r1.59.2.1
--- cust_pkg.cgi 12 Aug 2009 02:36:25 -0000 1.59
+++ cust_pkg.cgi 28 Oct 2009 06:15:09 -0000 1.59.2.1
@@ -164,7 +164,7 @@
$search_hash{'query'} = $cgi->keywords;
-for (qw( agentnum magic status classnum custom )) {
+for (qw( agentnum custnum magic status classnum custom )) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
More information about the freeside-commits
mailing list