From d14d966d6932a7dcbe34ab684342a5892609a574 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 7 May 2008 21:36:36 +0000 Subject: fix customer cancellation, sort of a side effect of #2872, fixes #3480, #3481 --- httemplate/view/cust_main.cgi | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 12aa82aac..3b47d76e8 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -13,24 +13,6 @@ function areyousure(href, message) { } - % if ( $curuser->access_right('Cancel customer') % && $cust_main->ncancelled_pkgs % ) { @@ -45,28 +27,23 @@ var confirm_cancel = '
misc/delete-customer.cgi?<% $custnum%>">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 %>

% } @@ -174,9 +151,9 @@ 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({ +my $cust_main = qsearchs( { 'table' => 'cust_main', - 'hashref' => {'custnum'=>$custnum}, + 'hashref' => { 'custnum' => $custnum }, 'extra_sql' => ' AND '. $curuser->agentnums_sql, }); die "Customer not found!" unless $cust_main; -- cgit v1.2.1