diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-06-15 22:19:13 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-06-15 22:19:13 -0500 |
commit | 5a6c2cf5ca5f1a80cad9310ec239a64dc8a280c1 (patch) | |
tree | b729c949a298e141e07b4ec163f309e394553569 /httemplate/misc | |
parent | 919943a3c5af718afa2eb47e9b4d9d3405f0bb73 (diff) |
RT#71298: Suspend Option for billing to continue
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/cancel_pkg.html | 2 | ||||
-rwxr-xr-x | httemplate/misc/process/cancel_pkg.html | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html index c80b2b278..81c5c4861 100755 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@ -62,7 +62,7 @@ &> % } -% if ( $method eq 'adjourn' || $method eq 'suspend' ) { +% if (( $method eq 'adjourn' || $method eq 'suspend' ) && $curuser->access_right('Customize billing during suspension')) { <TR><TD COLSPAN=2> % if ( $part_pkg->option('suspend_bill', 1) ) { <& /elements/checkbox.html, name=>'no_suspend_bill', value=>'Y' &> diff --git a/httemplate/misc/process/cancel_pkg.html b/httemplate/misc/process/cancel_pkg.html index c7a43979d..6972a49bf 100755 --- a/httemplate/misc/process/cancel_pkg.html +++ b/httemplate/misc/process/cancel_pkg.html @@ -33,8 +33,10 @@ $method =~ /^(cancel|expire|suspend|adjourn|resume|uncancel)$/ $method = $1; my $past_method = $past{$method}; +my $curuser = $FS::CurrentUser::CurrentUser; + die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right($right{$method}); + unless $curuser->access_right($right{$method}); #untaint pkgnum my $pkgnum = $cgi->param('pkgnum'); @@ -60,7 +62,8 @@ if ( $method eq 'suspend' ) { #or 'adjourn' $options = { map { $_ => scalar($cgi->param($_)) } qw( suspend_bill no_suspend_bill ) - }; + } + if $curuser->access_right('Customize billing during suspension'); } my $cust_pkg = qsearchs( 'cust_pkg', {'pkgnum'=>$pkgnum} ); |