X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fdelete-customer.cgi;h=203ed36a5ac2cbcf7780659ae8370db92e077646;hb=074464a707b2c8b83cc50cd0bb067660ef4d0f9f;hp=0ed3d0194f13b1d74b89380084bd087ba07c8b0c;hpb=22a35047ecdffff80110e06cc08fc84f9ddba9b0;p=freeside.git diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi index 0ed3d0194..203ed36a5 100755 --- a/httemplate/misc/delete-customer.cgi +++ b/httemplate/misc/delete-customer.cgi @@ -1,7 +1,48 @@ -<% +<% include('/elements/header.html', 'Delete customer') %> + +<% include('/elements/error.html') %> + +
+ +<% include('/elements/footer.html') %> + +%#Deleting a customer you have financial records on (i.e. credits) is +%#typically considered fraudulant bookkeeping. Remember, deleting +%#customers should ONLY be used for completely bogus records. You should +%#NOT delete real customers who simply discontinue service. +%# +%#For real customers who simply discontinue service, cancel all of the +%#customer's packages. Customers with all cancelled packages are not +%#billed. There is no need to take further action to prevent billing on +%#customers with all cancelled packages. +%# +%#Also see the "hidecancelledcustomers" and "hidecancelledpackages" +%#configuration options, which will allow you to surpress the display of +%#cancelled customers and packages, respectively. + +<%init> my $conf = new FS::Conf; -die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); +die "Customer deletions not enabled in configuration" + unless $conf->exists('deletecustomers'); + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Delete customer'); my($custnum, $new_custnum); if ( $cgi->param('error') ) { @@ -13,33 +54,11 @@ if ( $cgi->param('error') ) { $custnum = $1; $new_custnum = ''; } -my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) - or die "Customer not found: $custnum"; - -print header('Delete customer'); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print - qq!