[freeside-commits] freeside/httemplate/view/cust_main billing.html, 1.8.2.3, 1.8.2.4

Ivan,,, ivan at wavetail.420.am
Wed Jan 16 19:50:07 PST 2008


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail:/tmp/cvs-serv14621

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	billing.html 
Log Message:
don't show 'Bill now' link unless the current user can...

Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/billing.html,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -u -d -r1.8.2.3 -r1.8.2.4
--- billing.html	29 Apr 2007 23:30:53 -0000	1.8.2.3
+++ billing.html	17 Jan 2008 03:50:05 -0000	1.8.2.4
@@ -1,23 +1,17 @@
-%
-%  my( $cust_main ) = @_;
-%  my @invoicing_list = $cust_main->invoicing_list;
-%  my $conf = new FS::Conf;
-%  my $money_char = $conf->config('money_char') || '$';
-%
-
-
 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>
@@ -205,3 +199,11 @@
 $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>



More information about the freeside-commits mailing list