summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-04-27 13:41:59 -0700
committerIvan Kohler <ivan@freeside.biz>2017-04-27 13:41:59 -0700
commitd3ccf0b542d3b23f5bd851cdf1edbbc0de81f0b6 (patch)
tree82622688735c8c6687c141d71c1f0f2d49453826 /httemplate
parent76ab8e3f6ebd579b2bf9804528b55189d47f77bc (diff)
customer referral report, RT#75757
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menu.html1
-rwxr-xr-xhttemplate/search/cust_main.html9
2 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index fb1dd0626..0e0170f42 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -129,6 +129,7 @@ $report_customers_lists{'by active trouble tickets'} = [ $fsurl. 'search/cust_ma
if $conf->config('ticket_system');
$report_customers_lists{'with USPS-unvalidated addresses'} = [ $fsurl. 'search/cust_main.cgi?browse=uspsunvalid', '' ]
if $conf->config('usps_webtools-userid') && $conf->config('usps_webtools-password');
+$report_customers_lists{'with referrals'} = [ $fsurl. 'search/cust_main.html?with_referrals=1' ];
tie my %report_customers, 'Tie::IxHash';
$report_customers{'List customers'} = [ \%report_customers_lists, 'List customers' ]
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index b0ce31ae9..41309fdd1 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -27,7 +27,11 @@
$cgi->param('cust_fields')
)
),
- map '', @extra_fields
+ map { $_ eq 'num_referrals'
+ ? $referral_link
+ : ''
+ }
+ @extra_fields
],
&>
<%init>
@@ -51,6 +55,7 @@ my @scalars = qw (
all_tags
all_pkg_classnums
any_pkg_status
+ with_referrals
);
for my $param ( @scalars ) {
@@ -111,6 +116,8 @@ my @extra_fields = @{ delete($sql_query->{'extra_fields'}) };
my $link = [ "${p}view/cust_main.cgi?", 'custnum' ];
+my $referral_link = [ "${p}search/cust_main.cgi?referral_custnum=", 'custnum' ];
+
###
# email links
###