summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-cust_payby.html
diff options
context:
space:
mode:
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>