Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / elements / select-cust_payby.html
1 <% include( '/elements/select-table.html',
2                  'table'         => 'cust_payby',
3                  'name_col'      => 'label',
4                  'value'         => $custpaybynum,
5                  'disable_empty' => 1,
6                  'post_options'  => [ '0' => 'Enter new payment information' ],
7                  'hashref'       => { 'custnum'  => $opt{'custnum'},
8                                       'disabled' => '',
9                                     },
10                  %opt,
11              )
12 %>
13 <%init>
14
15 my %opt = @_;
16 my $custpaybynum = $opt{'curr_value'} || $opt{'value'};
17
18 if ( $opt{'cust_payby'} ) {
19   $opt{'records'} = delete $opt{'cust_payby'};
20   $opt{'presorted'} = 1 if ! exists($opt{'presorted'});
21 }
22
23 </%init>