summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-27 21:32:11 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-27 21:32:11 -0800
commit082486da42e753b3d3fe847578e60af3ac8432fa (patch)
tree543ccadbfc18bdea2c3dc4191682326789ff26ac
parent5ffd80e8e6ac4554fc4515b018eaf0354ebcdc9a (diff)
add agent_custid to cust_main-custom_link, RT#21998
-rw-r--r--FS/FS/Conf.pm2
-rw-r--r--httemplate/misc/custom_link_proxy.cgi2
2 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index bf457623f..597d19327 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5213,7 +5213,7 @@ and customer address. Include units.',
{
'key' => 'cust_main-custom_link',
'section' => 'UI',
- 'description' => 'URL to use as source for the "Custom" tab in the View Customer page. The customer number will be appended, or you can insert "$custnum" to have it inserted elsewhere. "$agentnum" will be replaced with the agent number, and "$usernum" will be replaced with the employee number.',
+ 'description' => 'URL to use as source for the "Custom" tab in the View Customer page. The customer number will be appended, or you can insert "$custnum" to have it inserted elsewhere. "$agentnum" will be replaced with the agent number, "$agent_custid" with be replaced with the agent customer ID (if any), and "$usernum" will be replaced with the employee number.',
'type' => 'textarea',
},
diff --git a/httemplate/misc/custom_link_proxy.cgi b/httemplate/misc/custom_link_proxy.cgi
index f3c6e376e..db9a048be 100644
--- a/httemplate/misc/custom_link_proxy.cgi
+++ b/httemplate/misc/custom_link_proxy.cgi
@@ -14,12 +14,14 @@ my $conf = new FS::Conf;
my $url = $conf->config('cust_main-custom_link');
my $agentnum = $cust_main->agentnum;
+my $agent_custid = $cust_main->agent_custid;
my $curuser = $FS::CurrentUser::CurrentUser;
my $usernum = $curuser->usernum;
# like eval(qq("$url")) but with fewer things that can go wrong
# and if $custnum isn't mentioned, assume it goes at the end
$url =~ s/\$custnum/$custnum/ or $url .= $custnum;
$url =~ s/\$agentnum/$agentnum/;
+$url =~ s/\$agent_custid/$agent_custid/;
$url =~ s/\$usernum/$usernum/;
#warn $url;