summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authorivan <ivan>2008-01-13 20:46:44 +0000
committerivan <ivan>2008-01-13 20:46:44 +0000
commitf9938915b0df2609f41c24d761d607595d5d0a34 (patch)
treeaa3fa94b86cc5422bd3530b0762033eb448bcdfe /httemplate/view/cust_main
parentd8c81a25cb29cf0ca5d7cdeb8160f79d4fbb0bc6 (diff)
ACLs
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/payment_history.html45
1 files changed, 28 insertions, 17 deletions
diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index 5af34c09c..19332f35d 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -126,10 +126,12 @@
% #completely unapplied
% $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
% $post = '</FONT></B>';
-% $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
-% $cust_pay->paynum.
-% qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
-%
+% if ( $curuser->access_right('Apply payment') # ) {
+% || $curuser->access_right('Post payment') ) { #remove after 1.7.3
+% $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
+% $cust_pay->paynum.
+% qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+% }
% } elsif ( scalar(@cust_bill_pay) == 1
% && scalar(@cust_pay_refund) == 0
% && $cust_pay->unapplied == 0 ) {
@@ -163,11 +165,14 @@
% if ( $cust_pay->unapplied > 0 ) {
% $desc .= '&nbsp;&nbsp;'.
% '<B><FONT COLOR="#FF0000">$'.
-% $cust_pay->unapplied. ' unapplied</FONT></B>'.
-% qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
-% $cust_pay->paynum.
-% qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
-% '<BR>';
+% $cust_pay->unapplied. ' unapplied</FONT></B>';
+% if ( $curuser->access_right('Apply payment') # ) {
+% || $curuser->access_right('Post payment') ) { #remove after 1.7.3
+% $desc .= qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
+% $cust_pay->paynum.
+% qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+% }
+% $desc .= '<BR>';
% }
% }
%
@@ -301,9 +306,12 @@
% #completely unapplied
% $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
% $post = '</FONT></B>';
-% $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
-% $cust_credit->crednum.
-% qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+% if ( $curuser->access_right('Apply credit') # ) {
+% || $curuser->access_right('Post credit') ) { #remove after 1.7.3
+% $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
+% $cust_credit->crednum.
+% qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+% }
% } elsif ( scalar(@cust_credit_bill) == 1
% && scalar(@cust_credit_refund) == 0
% && $cust_credit->credited == 0 ) {
@@ -336,11 +344,14 @@
% }
% if ( $cust_credit->credited > 0 ) {
% $desc .= '&nbsp;&nbsp;<B><FONT COLOR="#FF0000">$'.
-% $cust_credit->credited. ' unapplied</FONT></B>'.
-% qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
-% $cust_credit->crednum.
-% qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!.
-% '<BR>';
+% $cust_credit->credited. ' unapplied</FONT></B>';
+% if ( $curuser->access_right('Apply credit') # ) {
+% || $curuser->access_right('Post credit') ) { #remove after 1.7.3
+% $desc .= qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
+% $cust_credit->crednum.
+% qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
+% }
+% $desc .= '<BR>';
% }
% }
%#