projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
781e704
)
add (with config) ability to edit agent_custid
author
ivan
<ivan>
Mon, 16 Jun 2008 06:53:44 +0000
(06:53 +0000)
committer
ivan
<ivan>
Mon, 16 Jun 2008 06:53:44 +0000
(06:53 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
httemplate/edit/cust_main.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
1506dde
..
e54283d
100644
(file)
--- 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',
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'cust_main-edit_agent_custid',
+ 'section' => 'UI',
+ 'description' => 'Enable editing of the agent_custid field.',
+ 'type' => 'checkbox',
+ },
+
);
1;
);
1;
diff --git
a/httemplate/edit/cust_main.cgi
b/httemplate/edit/cust_main.cgi
index
8912278
..
f0d719c
100755
(executable)
--- a/
httemplate/edit/cust_main.cgi
+++ b/
httemplate/edit/cust_main.cgi
@@
-10,8
+10,8
@@
<FORM NAME="topform" STYLE="margin-bottom: 0">
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<FORM NAME="topform" STYLE="margin-bottom: 0">
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
-% if ( $custnum ) {
+% if ( $custnum ) {
Customer #<B><% $custnum %></B> -
<B><FONT COLOR="#<% $cust_main->statuscolor %>">
<% ucfirst($cust_main->status) %>
Customer #<B><% $custnum %></B> -
<B><FONT COLOR="#<% $cust_main->statuscolor %>">
<% ucfirst($cust_main->status) %>
@@
-19,11
+19,9
@@
<BR><BR>
% }
<BR><BR>
% }
-
<% &ntable("#cccccc") %>
<% &ntable("#cccccc") %>
-<!-- agent -->
-
+%# agent
<% include('/elements/tr-select-agent.html',
'curr_value' => $cust_main->agentnum,
'label' => "<B>${r}Agent</B>",
<% include('/elements/tr-select-agent.html',
'curr_value' => $cust_main->agentnum,
'label' => "<B>${r}Agent</B>",
@@
-32,16
+30,27
@@
)
%>
)
%>
-<!-- referral (advertising source) -->
-%
+%# agent_custid
+% if ( $conf->exists('cust_main-edit_agent_custid') ) {
+
+ <TR>
+ <TD ALIGN="right">Customer identifier</TD>
+ <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
+ </TR>
+
+% } else {
+
+ <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
+
+% }
+
+%# referral (advertising source)
%my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
%if ( $custnum && ! $conf->exists('editreferrals') ) {
%my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
%if ( $custnum && ! $conf->exists('editreferrals') ) {
-%
-
<INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
<INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
-% } else {
+% } else {
<% include('/elements/tr-select-part_referral.html',
'curr_value' => $refnum
<% include('/elements/tr-select-part_referral.html',
'curr_value' => $refnum
@@
-50,15
+59,12
@@
% }
% }
-<!-- referring customer -->
-%
+%# referring customer
%my $referring_cust_main = '';
%if ( $cust_main->referral_custnum
% and $referring_cust_main =
% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
%) {
%my $referring_cust_main = '';
%if ( $cust_main->referral_custnum
% and $referring_cust_main =
% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
%) {
-%
-
<TR>
<TD ALIGN="right">Referring customer</TD>
<TR>
<TD ALIGN="right">Referring customer</TD>
@@
-228,7
+234,7
@@
function bottomfixup(what) {
var topvars = new Array(
'birthdate',
var topvars = new Array(
'birthdate',
- 'custnum', 'agentnum', 'refnum', 'referral_custnum',
+ 'custnum', 'agentnum', '
agent_custid', '
refnum', 'referral_custnum',
'last', 'first', 'ss', 'company',
'address1', 'address2', 'city',
'last', 'first', 'ss', 'company',
'address1', 'address2', 'city',
@@
-469,7
+475,7
@@
function copyelement(from, to) {
% foreach my $hidden (
% 'birthdate',
%
% 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',
% 'last', 'first', 'ss', 'company',
% 'address1', 'address2', 'city',
% 'county', 'state', 'zip', 'country',