X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fdelete-customer.cgi;h=7016c9166229b9f8248a3ff20e22b94af55159a1;hp=ec1f734f1cb2555e07ed18b12df0f9ea71620491;hb=e6ea57971831f25d682d97a0ba508c39b66ecd8b;hpb=91387f8f489e561deaf1de052d80ef800a4970a3 diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi index ec1f734f1..7016c9166 100755 --- a/httemplate/misc/delete-customer.cgi +++ b/httemplate/misc/delete-customer.cgi @@ -1,34 +1,23 @@ + <% -# -use strict; -use vars qw( $cgi $conf $query $custnum $new_custnum $cust_main ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch qsearchs); -use FS::cust_main; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; +my $conf = new FS::Conf; die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); +my($custnum, $new_custnum); if ( $cgi->param('error') ) { $custnum = $cgi->param('custnum'); $new_custnum = $cgi->param('new_custnum'); } else { - ($query) = $cgi->keywords; + my($query) = $cgi->keywords; $query =~ /^(\d+)$/ or die "Illegal query: $query"; $custnum = $1; $new_custnum = ''; } -$cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) +my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) or die "Customer not found: $custnum"; -print $cgi->header ( @FS::CGI::header ), header('Delete customer'); +print header('Delete customer'); print qq!Error: !, $cgi->param('error'), "" @@ -54,4 +43,18 @@ canceled service with you. For that, cancel all of the customer's packages. END +#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. + %>