X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fmisc%2Fdelete-customer.cgi;h=378f69e61879aabd57693a1d5d9b3891165169d6;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hp=18f6e85291bda24d9d97b6a0c1e7e5c37b15bb0f;hpb=1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39;p=freeside.git diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi index 18f6e8529..378f69e61 100755 --- a/httemplate/misc/delete-customer.cgi +++ b/httemplate/misc/delete-customer.cgi @@ -1,46 +1,61 @@ - -<% + +% +% +%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 { +% my($query) = $cgi->keywords; +% $query =~ /^(\d+)$/ or die "Illegal query: $query"; +% $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!
!, +% qq!!; +% +%if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) { +% print "Move uncancelled packages to customer number ", +% qq!

!; +%} +% +%print <completely remove all traces of this customer record. This +%is not what you want if this is a real customer who has simply +%canceled service with you. For that, cancel all of the customer's packages. +%(you can optionally hide cancelled customers with the hidecancelledcustomers configuration option) +%
+%
Are you absolutely sure you want to delete this customer? +%
+% +%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. +% +% -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 { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "Illegal query: $query"; - $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!
!, - qq!!; - -if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) { - print "Move uncancelled packages to customer number ", - qq!

!; -} - -print <completely remove all traces of this customer record. This -is not what you want if this is a real customer who has simply -canceled service with you. For that, cancel all of the customer's packages. -(you can optionally hide cancelled customers with the hidecancelledcustomers configuration file) -
-
Are you absolutely sure you want to delete this customer? -
- -END - -%>