% % %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 | % } % if ( $curuser->access_right('Cancel customer') % && $cust_main->ncancelled_pkgs % ) { % Cancel this customer | % } % 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 % }

% %my $signupurl = $conf->config('signupurl'); %if ( $signupurl ) { % This customer's signup URL: <% $signupurl %>?ref=<% $custnum %>

% }
<% include('cust_main/contacts.html', $cust_main ) %> <% include('cust_main/misc.html', $cust_main ) %> % if ( $conf->config('payby-default') ne 'HIDE' ) {
<% include('cust_main/billing.html', $cust_main ) %> % }
% %if ( defined $cust_main->dbdef_table->column('comments') % && $cust_main->comments =~ /[^\s\n\r]/ ) { %
Comments <% ntable("#cccccc") %><% ntable("#cccccc",2) %>
<% encode_entities($cust_main->comments) %>
% } % if ( $conf->config('ticket_system') ) {
<% include('cust_main/tickets.html', $cust_main ) %> % }

<% include('cust_main/packages.html', $cust_main ) %> % if ( $conf->config('payby-default') ne 'HIDE' ) { <% include('cust_main/payment_history.html', $cust_main ) %> % } <% include('/elements/footer.html') %>