summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-04-17 10:06:56 -0700
committerMark Wells <mark@freeside.biz>2014-04-17 10:06:56 -0700
commitaf167dc766fad944b32ca7dc431b2549943b94dd (patch)
tree7e1d80ee78159b060819d371abf301e08fdddc30 /httemplate
parentf9bb139d807c80de32ce7d7f98f5b74712f03a99 (diff)
customer signup report, filter by customer and package class, #28025
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/graph/cust_signup.html21
-rw-r--r--httemplate/graph/report_cust_signup.html28
-rwxr-xr-xhttemplate/search/cust_main.html1
3 files changed, 41 insertions, 9 deletions
diff --git a/httemplate/graph/cust_signup.html b/httemplate/graph/cust_signup.html
index a3eb702f2..28466da02 100644
--- a/httemplate/graph/cust_signup.html
+++ b/httemplate/graph/cust_signup.html
@@ -38,6 +38,24 @@ $title = "$agentname $title" if $agentname;
my $link = $p.'search/cust_main.html?';
$link .= "agentnum=$agentnum;" if $agentnum;
+my %global_params;
+# cust_classnum
+my @classnums = grep /^\d+$/, $cgi->param('cust_classnum');
+if (@classnums) {
+ $global_params{'cust_classnum'} = [ @classnums ];
+ # classnum here, not cust_classnum, for cust_main.html
+ $link .= "classnum=$_;" foreach @classnums;
+}
+# pkg_classnum
+@classnums = grep /^\d+$/, $cgi->param('pkg_classnum');
+if (@classnums) {
+ $global_params{'pkg_classnum'} = [ @classnums ];
+ $link .= "pkg_classnum=$_;" foreach @classnums;
+ $link .= 'any_pkg_status=1;';
+ # because we report any customer that had the package at any time, not
+ # only those for whom it's still active
+}
+
my $bottom_link = $link;
my @referral;
@@ -68,7 +86,8 @@ my $hue_increment = 75;
my @signup_colors;
foreach my $referral (@referral) {
- my %params = ('refnum' => $referral->refnum) unless $all_referral;
+ my %params = %global_params;
+ $params{'refnum'} = $referral->refnum unless $all_referral;
push @items, 'signups';
push @labels, ( $all_referral ? 'Signups' : $referral->referral );
diff --git a/httemplate/graph/report_cust_signup.html b/httemplate/graph/report_cust_signup.html
index d4ea8c215..bfe788188 100644
--- a/httemplate/graph/report_cust_signup.html
+++ b/httemplate/graph/report_cust_signup.html
@@ -11,17 +11,29 @@
<& /elements/tr-select-from_to.html &>
<& /elements/tr-select-agent.html,
- 'curr_value' => scalar($cgi->param('agentnum')),
- 'label' => 'For agent: ',
- 'disable_empty' => 0,
+ 'curr_value' => scalar($cgi->param('agentnum')),
+ 'label' => 'For agent: ',
+ 'disable_empty' => 0,
&>
<& /elements/tr-select-part_referral.html,
- 'curr_value' => scalar($cgi->param('refnum')),
- 'label' => 'Advertising source: ',
- 'disable_empty' => 0,
- 'pre_options' => [ 'all' => 'all (aggregate)' ],
- 'empty_label' => 'all (breakdown)',
+ 'curr_value' => scalar($cgi->param('refnum')),
+ 'label' => 'Advertising source: ',
+ 'disable_empty' => 0,
+ 'pre_options' => [ 'all' => 'all (aggregate)' ],
+ 'empty_label' => 'all (breakdown)',
+&>
+
+<& /elements/tr-select-cust_class.html,
+ 'field' => 'cust_classnum',
+ 'label' => 'Customer class ',
+ 'multiple' => 1,
+&>
+
+<& /elements/tr-select-pkg_class.html,
+ 'field' => 'pkg_classnum',
+ 'label' => 'With package of class ',
+ 'multiple' => 1,
&>
<TR>
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index b97a4ef60..c0292aab2 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -48,6 +48,7 @@ my @scalars = qw (
cust_fields flattened_pkgs
all_tags
all_pkg_classnums
+ any_pkg_status
);
for my $param ( @scalars ) {