diff options
author | ivan <ivan> | 2008-01-13 21:14:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-13 21:14:19 +0000 |
commit | f49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1 (patch) | |
tree | 2104b5d1a05433756d3b91ee436cfaa8c24ab464 /httemplate/misc/recharge_svc.html | |
parent | 2d53d2ebdce80d0f0dc7f75ccf506a06c2f852f9 (diff) |
ACLs
Diffstat (limited to 'httemplate/misc/recharge_svc.html')
-rwxr-xr-x | httemplate/misc/recharge_svc.html | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/httemplate/misc/recharge_svc.html b/httemplate/misc/recharge_svc.html index a3de13d92..2302f3fd3 100755 --- a/httemplate/misc/recharge_svc.html +++ b/httemplate/misc/recharge_svc.html @@ -28,7 +28,7 @@ </TR> <TR> <TD>Enter prepaid card: </TD> - <TD><INPUT TYPE="text" NAME="prepaid" VALUE="<% $prepaid %>" <% $payby eq "PREP" ? '' : 'disabled' %>></TD> + <TD><INPUT TYPE="text" NAME="prepaid" VALUE="<% $prepaid |h %>" <% $payby eq "PREP" ? '' : 'disabled' %>></TD> </TR> </TABLE> @@ -37,35 +37,42 @@ <INPUT TYPE="submit" NAME="submit" VALUE="Recharge"> </FORM> -</BODY> -</HTML> + +<% include('/elements/footer.html'); <%once> + my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; + </%once> <%init> -my($svcnum, $cust_svc, $part_pkg, $label, $value, $prepaid, $amount, $payby); + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Recharge customer service'); + +my($svcnum, $prepaid, $payby); if ( $cgi->param('error') ) { $svcnum = $cgi->param('svcnum'); $prepaid = $cgi->param('prepaid'); $payby = $cgi->param('payby'); } elsif ( $cgi->param('svcnum') =~ /^(\d+)$/ ) { $svcnum = $1; + $prepaid = ''; } else { die "illegal query ". $cgi->keywords; } my $title = 'Recharge Service'; -$cust_svc = qsearchs('cust_svc', {'svcnum' => $svcnum}); +my $cust_svc = qsearchs('cust_svc', {'svcnum' => $svcnum}); die "No such service: $svcnum" unless $cust_svc; -($label, $value) = $cust_svc->label; +my($label, $value) = $cust_svc->label; $payby = $cust_svc->cust_pkg->cust_main->payby unless $payby; -$part_pkg = $cust_svc->cust_pkg->part_pkg; -$amount = $part_pkg->option('recharge_amount', 1) || 0; +my $part_pkg = $cust_svc->cust_pkg->part_pkg; +my $amount = $part_pkg->option('recharge_amount', 1) || 0; my $recharge_label = "Charge $money_char$amount for "; |