summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorivan <ivan>2008-06-05 05:06:36 +0000
committerivan <ivan>2008-06-05 05:06:36 +0000
commitd7977d0a346e3e5975c44a75b915bb437be66f4f (patch)
treefab1f36589dd47ddb27d54edd81a69b35fa92fd1 /httemplate/view
parente77f5d7c3812a65be18c5fc4ede509c42c5e3358 (diff)
payment and credit applications have separate "apply to refund" choices now, and no auto-refund choice in the invoice dropdown. RT#3545
Diffstat (limited to 'httemplate/view')
-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>';
}