diff options
author | ivan <ivan> | 2008-01-17 03:18:23 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-17 03:18:23 +0000 |
commit | 911ceed14633190dc705b931d83db12a6f3d233d (patch) | |
tree | 9a1d076ee18b5dea070973df073cf8bd5bf88ea2 /httemplate/view/cust_main/billing.html | |
parent | 64a84b4f848d7c1c936968e9fd6af7c5a61ba87d (diff) |
don't show 'Bill now' link unless the current user can...
Diffstat (limited to 'httemplate/view/cust_main/billing.html')
-rw-r--r-- | httemplate/view/cust_main/billing.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 3fcb5d460..fa3863b13 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,15 +1,17 @@ Billing information -% # If we can't see the unencrypted card, then bill now is an exercise in frustration -%if ( ! $cust_main->is_encrypted($cust_main->payinfo) ) { +%# If we can't see the unencrypted card, then bill now is an exercise in +%# frustration (without some sort of job queue magic to send it to a secure +%# machine, anyway) +%if ( $FS::CurrentUser::CurrentUser->access_right('Bill customer now') +% && ! $cust_main->is_encrypted($cust_main->payinfo) +% ) { (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>) % } <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %> -% + %( my $balance = $cust_main->balance ) % =~ s/^(\-?)(.*)$/<FONT SIZE=+1>$1<\/FONT>$money_char$2/; -% - <TR> <TD ALIGN="right">Balance due</TD> @@ -203,8 +205,10 @@ $paystate_label = 'Bank state' if $paystate_label =~/^paystate$/; </%once> <%init> + my( $cust_main ) = @_; my @invoicing_list = $cust_main->invoicing_list; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; + </%init> |