summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/payment_history/credit.html38
-rw-r--r--httemplate/view/cust_main/payment_history/payment.html38
2 files changed, 58 insertions, 18 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 .= '&nbsp;&nbsp;<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>';
}
diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html
index 96fca7f49..b9a06946d 100644
--- a/httemplate/view/cust_main/payment_history/payment.html
+++ b/httemplate/view/cust_main/payment_history/payment.html
@@ -49,6 +49,16 @@ if ( scalar(@cust_bill_pay) == 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_pay_refund.cgi?".
+ $cust_pay->paynum,
+ 'actionlabel' => 'Apply payment to refund',
+ 'width' => 392,
+ #default# 'height' => 336,
+ ).
+ ')';
}
} elsif ( scalar(@cust_bill_pay) == 1
&& scalar(@cust_pay_refund) == 0
@@ -85,15 +95,25 @@ if ( scalar(@cust_bill_pay) == 0
'<B><FONT COLOR="#FF0000">$'.
$cust_pay->unapplied. ' unapplied</FONT></B>';
if ( $curuser->access_right('Apply payment') ) {
- $desc = ' ('. include( '/elements/popup_link.html',
- 'label' => 'apply',
- 'action' => "${p}edit/cust_bill_pay.cgi?".
- $cust_pay->paynum,
- 'actionlabel' => 'Apply payment',
- 'width' => 392,
- #default# 'height' => 336,
- ).
- ')';
+ $apply = ' ('. include( '/elements/popup_link.html',
+ 'label' => 'apply',
+ 'action' => "${p}edit/cust_bill_pay.cgi?".
+ $cust_pay->paynum,
+ 'actionlabel' => 'Apply payment',
+ '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_pay_refund.cgi?".
+ $cust_pay->paynum,
+ 'actionlabel' => 'Apply payment to refund',
+ 'width' => 392,
+ #default# 'height' => 336,
+ ).
+ ')';
}
$desc .= '<BR>';
}