[freeside-commits] freeside/httemplate/view cust_bill.cgi, 1.37.2.1, 1.37.2.2

Ivan,,, ivan at wavetail.420.am
Sat Mar 29 19:45:12 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv14921/view

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_bill.cgi 
Log Message:
don't show invoice resend and payment posting links if you can't do that anyway

Index: cust_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill.cgi,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -u -d -r1.37.2.1 -r1.37.2.2
--- cust_bill.cgi	13 Jan 2008 20:46:50 -0000	1.37.2.1
+++ cust_bill.cgi	30 Mar 2008 02:45:10 -0000	1.37.2.2
@@ -4,56 +4,56 @@
 
 
 % if ( $cust_bill->owed > 0
-%        && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} )
-%      )
-%   {
+%      && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD) )
+%      && $FS::CurrentUser::CurrentUser->access_right('Post payment')
+%    )
+% {
 %     my $s = 0;
 
-  Post 
-% if ( $payby{'BILL'} ) { 
+      Post 
 
-  
-    <% $s++ ? ' | ' : '' %>
-    <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>">check</A>
-% } 
-% if ( $payby{'CASH'} ) { 
+%     if ( $payby{'BILL'} ) { 
+          <% $s++ ? ' | ' : '' %>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>">check</A>
+%     } 
 
-  
-    <% $s++ ? ' | ' : '' %>
-    <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>">cash</A>
-% } 
-% if ( $payby{'WEST'} ) { 
+%     if ( $payby{'CASH'} ) { 
+          <% $s++ ? ' | ' : '' %>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>">cash</A>
+%     } 
 
-  
-    <% $s++ ? ' | ' : '' %>
-    <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>">Western Union</A>
-% } 
-% if ( $payby{'MCRD'} ) { 
+%     if ( $payby{'WEST'} ) { 
+          <% $s++ ? ' | ' : '' %>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>">Western Union</A>
+%     } 
 
-  
-    <% $s++ ? ' | ' : '' %>
-    <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>">manual credit card</A>
-% } 
+%     if ( $payby{'MCRD'} ) { 
+          <% $s++ ? ' | ' : '' %>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>">manual credit card</A>
+%     } 
 
+      payment against this invoice<BR><BR>
 
-  payment against this invoice<BR>
 % } 
 
 
-<A HREF="<% $p %>misc/print-invoice.cgi?<% $link %>">Re-print this invoice</A>
-% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { 
+% if ( $FS::CurrentUser::CurrentUser->access_right('Resend invoices') ) {
 
-  | <A HREF="<% $p %>misc/email-invoice.cgi?<% $link %>">Re-email
-      this invoice</A>
-% } 
-% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { 
+    <A HREF="<% $p %>misc/print-invoice.cgi?<% $link %>">Re-print this invoice</A>
+
+%   if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { 
+        | <A HREF="<% $p %>misc/email-invoice.cgi?<% $link %>">Re-email this invoice</A>
+%   } 
+
+%   if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { 
+        | <A HREF="<% $p %>misc/fax-invoice.cgi?<% $link %>">Re-fax this invoice</A>
+%   } 
+
+    <BR><BR>
 
-  | <A HREF="<% $p %>misc/fax-invoice.cgi?<% $link %>">Re-fax
-      this invoice</A>
 % } 
 
 
-<BR><BR>
 % if ( $conf->exists('invoice_latex') ) { 
 
   <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>.pdf">View typeset invoice</A>



More information about the freeside-commits mailing list