summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-payby.html
blob: 94c303fc469aaff31b80a046ab3b1991b11a60e7 (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
<& tr-td-label.html, 'label' => emt('Payment type'), @_  &>

  <TD <% $style %>>

    <& /elements/select-payby.html, 
                  'curr_value'  => $curr_value,
                  %opt
    &>

  </TD>

</TR>

<%init>

my %opt = @_;

my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';

my $method = 'payby2longname';
$method = 'cust_payby2longname'  if $opt{'payby_type'} eq 'cust';

unless ( $opt{'paybys'} ) {
  tie %{ $opt{'paybys'} }, 'Tie::IxHash', FS::payby->$method();
}

my $curr_value = $opt{'curr_value'} || $opt{'value'};

</%init>