X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=89ddc38f29523a0734d076f1a48ecca9d0f470d7;hb=265a8a9728e907ccee97ed395e6eca3014deb890;hp=31fd1f81154d06ec0c512ecb9e0c53303c61f877;hpb=2d47f0f566b7e7afc30c050ec65fd9737194614d;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 31fd1f811..89ddc38f2 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,4 +1,3 @@
-
<%
my $conf = new FS::Conf;
@@ -12,12 +11,17 @@ foreach my $part_svc ( qsearch('part_svc',{}) ) {
%>
-<%= header("Customer View", menubar(
+
+<%= include("/elements/header.html","Customer View",
+ include("/elements/menubar.html",
'Main Menu' => $p,
)) %>
+
<%
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "No customer specified (bad URL)!" unless $cgi->keywords;
my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
$query =~ /^(\d+)$/;
@@ -25,13 +29,18 @@ my $custnum = $1;
my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
die "Customer not found!" unless $cust_main;
-print qq!Edit this customer!;
-
%>
+
+<% if ( $curuser->access_right('Edit customer') ) { %>
+ Edit this customer |
+<% } %>
+
+
+
-<% if ( $cust_main->ncancelled_pkgs ) { %>
+<% if ( $curuser->access_right('Cancel customer')
+ && $cust_main->ncancelled_pkgs
+ ) {
+%>
+ Cancel this customer |
+<% } %>
- | Cancel this customer
+<% if ( $conf->exists('deletecustomers')
+ && $curuser->access_right('Delete customer')
+ ) {
+%>
+ Delete this customer |
<% } %>
-<%
-
-print qq! | !.
- 'Delete this customer'
- if $conf->exists('deletecustomers');
-unless ( $conf->exists('disable_customer_referrals') ) {
- print qq! | !,
- qq!Refer a new customer!;
+<% unless ( $conf->exists('disable_customer_referrals') ) { %>
+ Refer a new customer |
+ View this customer's referrals
+<% } %>
- print qq! | !,
- qq!View this customer's referrals!;
-}
-print '
';
+
+<%
my $signupurl = $conf->config('signupurl');
if ( $signupurl ) {
-print "This customer's signup URL: ".
- "$signupurl?ref=$custnum
";
-}
-
%>
+ This customer's signup URL: <%= $signupurl %>?ref=<%= $custnum %>
+<% } %>
-<%= &itable() %>
+
<%= include('cust_main/contacts.html', $cust_main ) %> | -+ |
<%= include('cust_main/misc.html', $cust_main ) %>
<% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
@@ -134,5 +142,4 @@ Comments <%= include('cust_main/payment_history.html', $cust_main ) %> <% } %> - |