(pkg-balances) change package of unapplied payments and credits, RT#22198
[freeside.git] / httemplate / view / cust_main / payment_history / payment.html
index 9379207..4ec9271 100644 (file)
@@ -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 = '';