X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fdelete-customer.cgi;h=378f69e61879aabd57693a1d5d9b3891165169d6;hb=be10e7a1421c13eec4b1bb3676eaf5c84344e601;hp=7016c9166229b9f8248a3ff20e22b94af55159a1;hpb=e6ea57971831f25d682d97a0ba508c39b66ecd8b;p=freeside.git diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi index 7016c9166..378f69e61 100755 --- a/httemplate/misc/delete-customer.cgi +++ b/httemplate/misc/delete-customer.cgi @@ -1,60 +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!