add barcodes to invoices, HTML part, RT10698
[freeside.git] / httemplate / view / cust_bill.cgi
index f1618fa..3d3fb70 100755 (executable)
@@ -26,7 +26,7 @@
 
 % if ( $cust_bill->owed > 0
 %      && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD) )
-%      && $curuser->access_right('Post payment')
+%      && $curuser->access_right(['Post payment', 'Post check payment', 'Post cash payment'])
 %      && ! $conf->exists('pkg-balances')
 %    )
 % {
 
       Post 
 
-%     if ( $payby{'BILL'} ) { 
+%     if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>">check</A>
 %     } 
 
-%     if ( $payby{'CASH'} ) { 
+%     if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>">cash</A>
 %     } 
 
-%     if ( $payby{'WEST'} ) { 
+%     if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>">Western Union</A>
 %     } 
 
-%     if ( $payby{'MCRD'} ) { 
+%     if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>">manual credit card</A>
 %     } 
@@ -125,6 +125,8 @@ my %opt = (
   'notice_name'   => $notice_name,
 );
 
+$opt{'barcode_img'} = 1 if $conf->exists('invoice-barcode');
+
 my @payby =  grep /\w/, $conf->config('payby');
 #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
 @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))