X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=a2381f3684d66d3789940fb308fefda1fb2b365d;hp=7c9e0395c6ebafdea3411d03202a5412cd939a01;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=63a268637b2d51a8766412617724b9436439deb6
diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html
index 7c9e0395c..a2381f368 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -1,14 +1,38 @@
<% &ntable("#cccccc") %>
-%# agent
-<% include('/elements/tr-select-agent.html',
- 'curr_value' => $cust_main->agentnum,
- 'label' => "${r}Agent",
- 'empty_label' => 'Select agent',
- 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
- )
+%# tags
+<% include('/elements/tr-select-cust_tag.html',
+ 'custnum' => $custnum,
+ 'cgi' => $cgi,
+ )
%>
+%# agent
+% if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) {
+%
+% my $agentnum = $1;
+% $cust_main->agentnum($agentnum);
+
+
+
+
+ Agent |
+ <% $cust_main->agent->agent |h %> |
+
+
+% } else {
+
+ <% include('/elements/tr-select-agent.html',
+ 'curr_value' => $cust_main->agentnum,
+ 'label' => "${r}Agent",
+ 'empty_label' => 'Select agent',
+ 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
+ 'viewall_right' => 'None', #override default 'View customers of all agents'
+ )
+ %>
+
+% }
+
%# agent_custid
% if ( $conf->exists('cust_main-edit_agent_custid') ) {
@@ -52,6 +76,7 @@
%if ( $cust_main->referral_custnum
% and $referring_cust_main =
% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
+% and ! $curuser->access_right('Edit referring customer')
%) {
@@ -61,8 +86,8 @@
-% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
+% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
Referring customer |
@@ -70,13 +95,13 @@
<% include('/elements/search-cust_main.html',
'field_name' => 'referral_custnum',
+ 'curr_value' => $cust_main->referral_custnum,
)
%>
-% } else {
-
+% } else {
% }
@@ -86,7 +111,7 @@
'name' => 'signupdate',
'value' => $cust_main->signupdate,
'label' => 'Signup date',
- 'format' => $conf->config('date_format') || "%m/%d/%Y",
+ 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
})
%>
% }
@@ -101,6 +126,8 @@ my $custnum = $opt{'custnum'};
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
my $r = qq!* !;
%init>