blob: 0415bc9dde140bb657c2bbfff95243e9af8634d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
% if ( $error ) {
% errorpage($error);
% } else {
<% $cgi->redirect($p. "browse/cgp_rule.html?svcnum=". $svcnum) %>
% }
<%init>
# :/ needs agent-virt so you can't futz with arbitrary rules
#die "access denied"
# unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service');
#untaint rulenum
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal rulenum";
my $rulenum = $1;
my $cgp_rule = qsearchs('cgp_rule', { 'rulenum' => $rulenum } );
my $svcnum = $cgp_rule->svcnum;
my $error = $cgp_rule->delete;
</%init>
|