X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=3d3fb7028668c97cefb2144a82fcaa4d72c8b0a1;hb=c77780a77b217b155d7a13d57cf187e112fc2317;hp=ce8d96a950e7f7aae59608e99e506f4d2425c3e9;hpb=995a145c931164347683071c95c6754379d36604;p=freeside.git
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index ce8d96a95..3d3fb7028 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -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')
% )
% {
@@ -34,22 +34,22 @@
Post
-% if ( $payby{'BILL'} ) {
+% if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) {
<% $s++ ? ' | ' : '' %>
check
% }
-% if ( $payby{'CASH'} ) {
+% if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) {
<% $s++ ? ' | ' : '' %>
cash
% }
-% if ( $payby{'WEST'} ) {
+% if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) {
<% $s++ ? ' | ' : '' %>
Western Union
% }
-% if ( $payby{'MCRD'} ) {
+% if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) {
<% $s++ ? ' | ' : '' %>
manual credit card
% }
@@ -117,12 +117,15 @@ if ( $query =~ /^((.+)-)?(\d+)$/ ) {
$notice_name = $cgi->param('notice_name');
}
+my $conf = new FS::Conf;
+
my %opt = (
- 'template' => $template,
- 'notice_name' => $notice_name,
+ 'unsquelch_cdr' => $conf->exists('voip-cdr_email'),
+ 'template' => $template,
+ 'notice_name' => $notice_name,
);
-my $conf = new FS::Conf;
+$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 ))