pkg_cancel event action, RT#10141
[freeside.git] / httemplate / misc / delete-cust_bill.html
1 % if ( $error ) {
2 %   errorpage($error);
3 % } else {
4 <% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
5 % }
6 <%init>
7
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Delete invoices');
10
11 #untaint invnum
12 my($query) = $cgi->keywords;
13 $query =~ /^(\d+)$/ || die "Illegal crednum";
14 my $invnum = $1;
15
16 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
17 my $custnum = $cust_bill->custnum;
18
19 my $error = $cust_bill->delete;
20
21 </%init>