X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=78bcb1fc138b9b5cb7a123202762c927e2536e73;hb=e1b1693a656964c6db0b8a3fb85494014434dcb1;hp=e82a5196c5eb436e8b7e6366f17c5e0b1f68e9c7;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index e82a5196c..78bcb1fc1 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,31 +1,21 @@
-%
-%
-%my $conf = new FS::Conf;
-%
-%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+)$/;
-%my $custnum = $1;
-%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
-%die "Customer not found!" unless $cust_main;
-%
-%
-
-
-<% include("/elements/header.html","Customer View: ". $cust_main->name ) %>
-% if ( $curuser->access_right('Edit customer') ) {
-
- Edit this customer |
-% }
-
+<% include('/elements/header.html', {
+ 'title' => "Customer View: ". $cust_main->name,
+ 'nobr' => 1,
+ })
+%>
+
+<% include('/elements/menubar.html',
+ { 'newstyle' => 1,
+ 'selected' => $viewname{$view},
+ 'url_base' => $cgi->url. "?custnum=$custnum;show=",
+ },
+ %views,
+ )
+%>
+
-
-
-
-
+<% include('/elements/init_overlib.html') %>
-
% if ( $curuser->access_right('Cancel customer')
% && $cust_main->ncancelled_pkgs
% ) {
-%
- Cancel this customer |
-% }
+ <% include( '/elements/popup_link-cust_main.html',
+ { 'action' => $p. 'misc/cancel_cust.html',
+ 'label' => 'Cancel this customer',
+ 'actionlabel' => 'Confirm Cancellation',
+ 'color' => '#ff0000',
+ 'cust_main' => $cust_main,
+ }
+ )
+ %> |
+
+% }
+
% if ( $conf->exists('deletecustomers')
% && $curuser->access_right('Delete customer')
% ) {
-%
-
Delete this customer |
% }
-% unless ( $conf->exists('disable_customer_referrals') ) {
- Refer a new customer |
- View this customer's referrals
+% unless ( $conf->exists('disable_customer_referrals') ) {
+ Refer a new customer |
+ View this customer's referrals
% }
+
+% if ( $curuser->access_right('Billing event reports')
+% || $curuser->access_right('View customer billing events')
+% ) {
+
+ View billing events for this customer
+
+
+% }
-
-%
%my $signupurl = $conf->config('signupurl');
%if ( $signupurl ) {
-%
-
This customer's signup URL: <% $signupurl %>?ref=<% $custnum %>
% }
@@ -101,11 +91,12 @@ var confirm_cancel = '