summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_main
diff options
context:
space:
mode:
authorivan <ivan>2010-02-04 10:00:33 +0000
committerivan <ivan>2010-02-04 10:00:33 +0000
commit1bfbab83c338f6a11ae26c4d197ad775c568ebde (patch)
treeaf99af5a52390fcfa09a8fdb69b68927d3d0272d /httemplate/edit/cust_main
parent6d43279ab6b571ad33d2d89d7403b72fdf5bc772 (diff)
add ability to edit referring customer, RT#7174
Diffstat (limited to 'httemplate/edit/cust_main')
-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 7c9e039..11ea52a 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -52,6 +52,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>
@@ -61,8 +62,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>
@@ -70,13 +71,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="">
% }
@@ -101,6 +102,8 @@ my $custnum = $opt{'custnum'};
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
</%init>