[freeside-commits] branch FREESIDE_3_BRANCH updated. 7d0051e59f618483b0752308dff77efeb96d49fe

Jeremy Davis jeremyd at 420.am
Mon Feb 10 06:54:48 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  7d0051e59f618483b0752308dff77efeb96d49fe (commit)
      from  f907d8bf4bc742e2a7fc3560c00f2591e3fb5d59 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7d0051e59f618483b0752308dff77efeb96d49fe
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jan 27 21:32:11 2014 -0800

    add agent_custid to cust_main-custom_link, RT#21998

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index b860668..f47d54d 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5217,7 +5217,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 f3c6e37..db9a048 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;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm                         |    2 +-
 httemplate/misc/custom_link_proxy.cgi |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list