diff options
Diffstat (limited to 'httemplate/view/cust_main/payment_history/credit.html')
-rw-r--r-- | httemplate/view/cust_main/payment_history/credit.html | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html index bf769455b..fd43c1ac8 100644 --- a/httemplate/view/cust_main/payment_history/credit.html +++ b/httemplate/view/cust_main/payment_history/credit.html @@ -25,6 +25,16 @@ if ( scalar(@cust_credit_bill) == 0 #default# 'height' => 336, ). ')'; + #XXX if there are any open refunds + $apply.= ' ('. include( '/elements/popup_link.html', + 'label' => 'apply to refund', + 'action' => "${p}edit/cust_credit_refund.cgi?". + $cust_credit->crednum, + 'actionlabel' => 'Apply credit to refund', + 'width' => 392, + #default# 'height' => 336, + ). + ')'; } } elsif ( scalar(@cust_credit_bill) == 1 && scalar(@cust_credit_refund) == 0 @@ -60,15 +70,25 @@ if ( scalar(@cust_credit_bill) == 0 $desc .= ' <B><FONT COLOR="#FF0000">$'. $cust_credit->credited. ' unapplied</FONT></B>'; if ( $curuser->access_right('Apply credit') ) { - $desc = ' ('. include( '/elements/popup_link.html', - 'label' => 'apply', - 'action' => "${p}edit/cust_credit_bill.cgi?". - $cust_credit->crednum, - 'actionlabel' => 'Apply credit', - 'width' => 392, - #default# 'height' => 336, - ). - ')'; + $apply = ' ('. include( '/elements/popup_link.html', + 'label' => 'apply', + 'action' => "${p}edit/cust_credit_bill.cgi?". + $cust_credit->crednum, + 'actionlabel' => 'Apply credit', + 'width' => 392, + #default# 'height' => 336, + ). + ')'; + #XXX if there are any open refunds + $apply.= ' ('. include( '/elements/popup_link.html', + 'label' => 'apply to refund', + 'action' => "${p}edit/cust_credit_refund.cgi?". + $cust_credit->crednum, + 'actionlabel' => 'Apply credit to refund', + 'width' => 392, + #default# 'height' => 336, + ). + ')'; } $desc .= '<BR>'; } |