summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/cust_main/top_misc.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html
index 041050664..3d6c4862d 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -43,6 +43,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')
%) {
<TR>
@@ -52,8 +53,8 @@
</TD>
</TR>
<INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
-% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
+% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
<TR>
<TD ALIGN="right">Referring customer</TD>
@@ -61,13 +62,13 @@
<!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
<% include('/elements/search-cust_main.html',
'field_name' => 'referral_custnum',
+ 'curr_value' => $cust_main->referral_custnum,
)
%>
</TD>
</TR>
-% } else {
-
+% } else {
<INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
% }
@@ -92,6 +93,8 @@ my $custnum = $opt{'custnum'};
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
</%init>