summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-cust_payby.html
blob: e5ace4d392e3f10add0671f266f05a3ec472d0be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% if ( scalar(@{ $opt{'cust_payby'} }) == 0 ) {

  <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'custpaybynum' %>" VALUE="">

% } else { 

  <TR>
    <TH ALIGN="right"><% $opt{'label'} || 'Payment via' %></TD>
    <TD>
      <% include( '/elements/select-cust_payby.html',
                    'curr_value' => $custpaybynum,
                    %opt
                )
      %>
    </TD>
  </TR>

% } 

<%init>

my %opt = @_;
my $custpaybynum = $opt{'curr_value'} || $opt{'value'};

$opt{'cust_payby'} ||= [ qsearch( 'cust_payby', { custnum  => $opt{custnum},
                                                  disabled => '',
                                                }
                                )
                       ];

</%init>