<% include('/elements/header-popup.html', 'Cancel customer' ) %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="cust_cancel_popup" ACTION="<% popurl(1) %>cust_main-cancel.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
$curuser = $FS::CurrentUser::CurrentUser;
+die "access denied" unless $curuser->access_right('Cancel customer');
+
$cust_main = qsearchs( {
'table' => 'cust_main',
'hashref' => { 'custnum' => $custnum },