From: ivan Date: Mon, 16 Jun 2008 06:53:50 +0000 (+0000) Subject: add (with config) ability to edit agent_custid X-Git-Tag: freeside_1_7_4rc1~294 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=1d5c8cc1f28fb2a1a02c77cd08f55d02914f5179;p=freeside.git add (with config) ability to edit agent_custid --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 4c2930719..485dea990 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2296,6 +2296,13 @@ worry that config_items is freeside-specific and icky. 'type' => 'checkbox', }, + { + 'key' => 'cust_main-edit_agent_custid', + 'section' => 'UI', + 'description' => 'Enable editing of the agent_custid field.', + 'type' => 'checkbox', + }, + ); 1; diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 5a06b11ff..e94a7af75 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -8,8 +8,8 @@
-% if ( $custnum ) { +% if ( $custnum ) { Customer #<% $custnum %> - <% ucfirst($cust_main->status) %> @@ -17,11 +17,9 @@

% } - <% &ntable("#cccccc") %> - - +%# agent <% include('/elements/tr-select-agent.html', $cust_main->agentnum, 'label' => "${r}Agent", 'empty_label' => 'Select agent', @@ -29,30 +27,38 @@ ) %> - -% +%# agent_custid +% if ( $conf->exists('cust_main-edit_agent_custid') ) { + + + Customer identifier + + + +% } else { + + + +% } + +%# referral (advertising source) %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; %if ( $custnum && ! $conf->exists('editreferrals') ) { -% - -% } else { +% } else { <% include('/elements/tr-select-part_referral.html', $refnum ) %> % } - -% +%# referring customer %my $referring_cust_main = ''; %if ( $cust_main->referral_custnum % and $referring_cust_main = % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) %) { -% - Referring customer @@ -212,7 +218,7 @@ function bottomfixup(what) { var topvars = new Array( 'birthdate', - 'custnum', 'agentnum', 'refnum', 'referral_custnum', + 'custnum', 'agentnum', 'agent_custid', 'refnum', 'referral_custnum', 'last', 'first', 'ss', 'company', 'address1', 'address2', 'city', @@ -297,7 +303,7 @@ function copyelement(from, to) { % foreach my $hidden ( % 'birthdate', % -% 'custnum', 'agentnum', 'refnum', 'referral_custnum', +% 'custnum', 'agentnum', 'agent_custid', 'refnum', 'referral_custnum', % 'last', 'first', 'ss', 'company', % 'address1', 'address2', 'city', % 'county', 'state', 'zip', 'country',