summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2008-06-16 06:53:50 +0000
committerivan <ivan>2008-06-16 06:53:50 +0000
commit1d5c8cc1f28fb2a1a02c77cd08f55d02914f5179 (patch)
tree99b8e7bd50b1ca439091503e1f70b8045a9d7be9 /httemplate/edit
parentb2df599fced4d7a11ee1fec7e74ea81d8fb11669 (diff)
add (with config) ability to edit agent_custid
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/cust_main.cgi36
1 files changed, 21 insertions, 15 deletions
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 @@
<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) %>
@@ -17,11 +17,9 @@
<BR><BR>
% }
-
<% &ntable("#cccccc") %>
-<!-- agent -->
-
+%# agent
<% include('/elements/tr-select-agent.html', $cust_main->agentnum,
'label' => "<B>${r}Agent</B>",
'empty_label' => 'Select agent',
@@ -29,30 +27,38 @@
)
%>
-<!-- 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') ) {
-%
-
<INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
-% } else {
+% } else {
<% include('/elements/tr-select-part_referral.html', $refnum ) %>
% }
-<!-- 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 } )
%) {
-%
-
<TR>
<TD ALIGN="right">Referring customer</TD>
@@ -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',