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=041050664edd5c00dfa216a72edc20582137d8ab;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=c183de0b7e942672cafdc1c14a203e389ffd2c43
diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html
index 041050664..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') ) {
@@ -23,6 +47,15 @@
% }
+%# class
+<% include('/elements/tr-select-cust_class.html',
+ 'curr_value' => $cust_main->classnum,
+ 'label' => "Class",
+ #'empty_label' => '(none)',
+ #'disable_empty' =>
+ )
+%>
+
%# referral (advertising source)
%my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
%if ( $custnum && ! $conf->exists('editreferrals') ) {
@@ -43,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')
%) {
@@ -52,8 +86,8 @@
-% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
+% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
Referring customer |
@@ -61,13 +95,13 @@
<% include('/elements/search-cust_main.html',
'field_name' => 'referral_custnum',
+ 'curr_value' => $cust_main->referral_custnum,
)
%>
-% } else {
-
+% } else {
% }
@@ -77,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" ),
})
%>
% }
@@ -92,6 +126,8 @@ my $custnum = $opt{'custnum'};
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
my $r = qq!* !;
%init>