3 my $conf = new FS::Conf;
4 die "Customer deletions not enabled" unless $conf->exists('deletecustomers');
6 my($custnum, $new_custnum);
7 if ( $cgi->param('error') ) {
8 $custnum = $cgi->param('custnum');
9 $new_custnum = $cgi->param('new_custnum');
11 my($query) = $cgi->keywords;
12 $query =~ /^(\d+)$/ or die "Illegal query: $query";
16 my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
17 or die "Customer not found: $custnum";
19 print header('Delete customer');
21 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
23 if $cgi->param('error');
26 qq!<form action="!, popurl(1), qq!process/delete-customer.cgi" method=post>!,
27 qq!<input type="hidden" name="custnum" value="$custnum">!;
29 if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) {
30 print "Move uncancelled packages to customer number ",
31 qq!<input type="text" name="new_custnum" value="$new_custnum"><br><br>!;
35 This will <b>completely remove</b> all traces of this customer record. This
36 is <B>not</B> what you want if this is a real customer who has simply
37 canceled service with you. For that, cancel all of the customer's packages.
38 (you can optionally hide cancelled customers with the <a href="../docs/config.html#hidecancelledcustomers">hidecancelledcustomers</a> configuration file)
40 <br>Are you <b>absolutely sure</b> you want to delete this customer?
41 <br><input type="submit" value="Yes">