X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=e82a5196c5eb436e8b7e6366f17c5e0b1f68e9c7;hp=8267fea512a20c2ec2ea2bb3bd62e104a2a287a2;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 8267fea51..e82a5196c 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,23 +1,25 @@ -<% +% +% +%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; +% +% -my $conf = new FS::Conf; -my $curuser = $FS::CurrentUser::CurrentUser; +<% include("/elements/header.html","Customer View: ". $cust_main->name ) %> +% if ( $curuser->access_right('Edit customer') ) { -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; + Edit this customer | +% } -%> - -<%= include("/elements/header.html","Customer View: ". $cust_main->name ) %> - -<% if ( $curuser->access_right('Edit customer') ) { %> - Edit this customer | -<% } %> @@ -33,96 +35,100 @@ function areyousure(href, message) { +% if ( $curuser->access_right('Cancel customer') +% && $cust_main->ncancelled_pkgs +% ) { +% -<% if ( $curuser->access_right('Cancel customer') - && $cust_main->ncancelled_pkgs - ) { -%> Cancel this customer | -<% } %> - +% } +% if ( $conf->exists('deletecustomers') +% && $curuser->access_right('Delete customer') +% ) { +% -<% if ( $conf->exists('deletecustomers') - && $curuser->access_right('Delete customer') - ) { -%> - Delete this 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 -<% } %>

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

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

-<%= include('cust_main/packages.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 ) %> +% } -<% if ( $conf->config('payby-default') ne 'HIDE' ) { %> - <%= include('cust_main/payment_history.html', $cust_main ) %> -<% } %> -<%= include('/elements/footer.html') %> +<% include('/elements/footer.html') %>