X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=db30d3ecc8d50719ddceff8991ae55e391810248;hb=7efc882e67c25728c07990e852a590cbddfc1dc6;hp=42e1e61773320dafd359131295eb0233679d755a;hpb=17856ff5c299e4db21da28116f2666655c03f2c7;p=freeside.git
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 42e1e6177..db30d3ecc 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,122 +1,76 @@
<% include("/elements/header.html",'Invoice View', menubar(
- "Main Menu" => $p,
"View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)) %>
% 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++ ? ' | ' : '' %>
- check
-% }
-% if ( $payby{'CASH'} ) {
+% if ( $payby{'BILL'} ) {
+ <% $s++ ? ' | ' : '' %>
+ check
+% }
-
- <% $s++ ? ' | ' : '' %>
- cash
-% }
-% if ( $payby{'WEST'} ) {
+% if ( $payby{'CASH'} ) {
+ <% $s++ ? ' | ' : '' %>
+ cash
+% }
-
- <% $s++ ? ' | ' : '' %>
- Western Union
-% }
-% if ( $payby{'MCRD'} ) {
+% if ( $payby{'WEST'} ) {
+ <% $s++ ? ' | ' : '' %>
+ Western Union
+% }
-
- <% $s++ ? ' | ' : '' %>
- manual credit card
-% }
+% if ( $payby{'MCRD'} ) {
+ <% $s++ ? ' | ' : '' %>
+ manual credit card
+% }
+ payment against this invoice
- payment against this invoice
% }
-Re-print this invoice
-% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
+% if ( $FS::CurrentUser::CurrentUser->access_right('Resend invoices') ) {
- | Re-email
- this invoice
-% }
-% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) {
+ Re-print this invoice
+
+% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
+ | Re-email this invoice
+% }
+
+% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) {
+ | Re-fax this invoice
+% }
+
+
- | Re-fax
- this invoice
% }
-
% if ( $conf->exists('invoice_latex') ) {
View typeset invoice
% }
-% #false laziness with search/cust_bill_event.cgi
-% unless ( $templatename ) {
-
-
- <% table() %>
-