summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-12-30 22:14:26 -0800
committerIvan Kohler <ivan@freeside.biz>2013-12-30 22:14:26 -0800
commit357154e4844983731281c30a666893c60c45748e (patch)
tree07e426ad2147ec0b927f93f6a6329b6cc10fae21 /httemplate/view
parent7a4df417fbc5e48c1b257f8695bcd4c2a1612d91 (diff)
(pkg-balances) change package of unapplied payments and credits, RT#22198
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/payment_history/credit.html18
-rw-r--r--httemplate/view/cust_main/payment_history/payment.html18
2 files changed, 31 insertions, 5 deletions
diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html
index ec5041b55..941180e80 100644
--- a/httemplate/view/cust_main/payment_history/credit.html
+++ b/httemplate/view/cust_main/payment_history/credit.html
@@ -1,5 +1,4 @@
-<% $credit %>
-<% "$reason$desc$apply$delete$unapply" %>
+<% $credit. ' '. $reason. $desc. $change_pkg. $apply. $delete. $unapply %>
<%init>
my( $cust_credit, %opt ) = @_;
@@ -113,7 +112,20 @@ if ( scalar(@cust_credit_bill) == 0
$desc .= '<BR>';
}
}
-#
+
+my $change_pkg = '';
+if ( $apply && $opt{'pkg-balances'} && $cust_credit->pkgnum ) {
+ $change_pkg =
+ ' ('. include('/elements/popup_link.html',
+ 'label' => emt('change package'),
+ 'action' => "${p}edit/cust_credit-pkgnum.html?crednum=".
+ $cust_credit->crednum,
+ 'actionlabel' => emt('Change credit package'),
+ 'width' => 763,
+ ).
+ ')';
+}
+
my $delete = '';
$delete = areyousure_link("${p}misc/delete-cust_credit.cgi?".$cust_credit->crednum,
emt('Are you sure you want to delete this credit?'),
diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html
index 937920710..4ec9271ef 100644
--- a/httemplate/view/cust_main/payment_history/payment.html
+++ b/httemplate/view/cust_main/payment_history/payment.html
@@ -1,5 +1,6 @@
-<% $payment %>
-<% "$info$desc$view$apply$refund$void$delete$unapply" %>
+<% $payment. ' '. $info. $desc.
+ $view. $change_pkg. $apply. $refund. $void. $delete. $unapply
+%>
<%init>
my( $cust_pay, %opt ) = @_;
@@ -143,6 +144,19 @@ my $view =
).
')';
+my $change_pkg = '';
+if ( $apply && $opt{'pkg-balances'} && $cust_pay->pkgnum ) {
+ $change_pkg =
+ ' ('. include('/elements/popup_link.html',
+ 'label' => emt('change package'),
+ 'action' => "${p}edit/cust_pay-pkgnum.html?paynum=".
+ $cust_pay->paynum,
+ 'actionlabel' => emt('Change payment package'),
+ 'width' => 763,
+ ).
+ ')';
+}
+
my $refund = '';
my $refund_days = $opt{'card_refund-days'} || 120;
my $refund_right = '';