summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-cust_payby.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-01-29 18:26:43 -0800
committerIvan Kohler <ivan@freeside.biz>2016-01-29 18:26:43 -0800
commit5d089cbe4980f7c9c25b83e164099b22bc59eead (patch)
tree9c1668cb5003e706b7f2f61ab8c54c9795576572 /httemplate/elements/select-cust_payby.html
parent9db332d80967969856c5b5fe8b6ac91304734b04 (diff)
Use any card on file when making a payment, RT#23741
Diffstat (limited to 'httemplate/elements/select-cust_payby.html')
-rw-r--r--httemplate/elements/select-cust_payby.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/httemplate/elements/select-cust_payby.html b/httemplate/elements/select-cust_payby.html
new file mode 100644
index 0000000..a726cb3
--- /dev/null
+++ b/httemplate/elements/select-cust_payby.html
@@ -0,0 +1,23 @@
+<% include( '/elements/select-table.html',
+ 'table' => 'cust_payby',
+ 'name_col' => 'label',
+ 'value' => $custpaybynum,
+ 'disable_empty' => 1,
+ 'post_options' => [ '0' => 'Enter new payment information' ],
+ 'hashref' => { 'custnum' => $opt{'custnum'},
+ 'disabled' => '',
+ },
+ %opt,
+ )
+%>
+<%init>
+
+my %opt = @_;
+my $custpaybynum = $opt{'curr_value'} || $opt{'value'};
+
+if ( $opt{'cust_payby'} ) {
+ $opt{'records'} = delete $opt{'cust_payby'};
+ $opt{'presorted'} = 1 if ! exists($opt{'presorted'});
+}
+
+</%init>