X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=20e8201e6220bdfe657cf93c94528821f6434a95;hb=d15c3f4bcdeaf94b1a286691ec670d7c32dbd3d3;hp=8e76619ae963957a2f199cf543e3c4f31e0d4075;hpb=ecb895ccbbf52ed2babc0885c9925022175e33a0;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 8e76619ae..20e8201e6 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,636 +1,165 @@
-
-<%
-
-my $conf = new FS::Conf;
-
-#false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so
-my %uiview = ();
-my %uiadd = ();
-foreach my $part_svc ( qsearch('part_svc',{}) ) {
- $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
- $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
+%
+%
+%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 |
+% }
+
+
+
+
+
+
+
+
+
-print header("Customer View", menubar(
- 'Main Menu' => popurl(2)
-));
-
-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;
-
-print qq!Edit this customer!;
-print qq! | Delete this customer!
- if $conf->exists('deletecustomers');
-
-unless ( $conf->exists('disable_customer_referrals') ) {
- print qq! | !,
- qq!Refer a new customer!;
-
- print qq! | !,
- qq!View this customer's referrals!;
-}
+
+% if ( $curuser->access_right('Cancel customer')
+% && $cust_main->ncancelled_pkgs
+% ) {
+%
-print '';
-
-print '
'.
- '