From 65aab7693066ed02669a9d499d4578ab1c293859 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Jun 2008 06:53:44 +0000 Subject: [PATCH] add (with config) ability to edit agent_custid --- FS/FS/Conf.pm | 7 +++++++ httemplate/edit/cust_main.cgi | 36 +++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 1506dde77..e54283d2b 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2278,6 +2278,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 891227838..f0d719c2e 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -10,8 +10,8 @@
-% if ( $custnum ) { +% if ( $custnum ) { Customer #<% $custnum %> - <% ucfirst($cust_main->status) %> @@ -19,11 +19,9 @@

% } - <% &ntable("#cccccc") %> - - +%# agent <% include('/elements/tr-select-agent.html', 'curr_value' => $cust_main->agentnum, 'label' => "${r}Agent", @@ -32,16 +30,27 @@ ) %> - -% +%# 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', 'curr_value' => $refnum @@ -50,15 +59,12 @@ % } - -% +%# 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 @@ -228,7 +234,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', @@ -469,7 +475,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', -- 2.11.0