invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / elements / tr-select-cust_payby.html
1 % if ( scalar(@{ $opt{'cust_payby'} }) == 0 ) { 
2
3   <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'custpaybynum' %>" VALUE="">
4
5 % } else { 
6
7   <TR>
8     <TH ALIGN="right"><% $opt{'label'} || 'Payment via' %></TD>
9     <TD>
10       <% include( '/elements/select-cust_payby.html',
11                     'curr_value' => $custpaybynum,
12                     %opt
13                 )
14       %>
15     </TD>
16   </TR>
17
18 % } 
19
20 <%init>
21
22 my %opt = @_;
23 my $custpaybynum = $opt{'curr_value'} || $opt{'value'};
24
25 $opt{'cust_payby'} ||= [ qsearch( 'cust_payby', { custnum  => $opt{custnum},
26                                                   disabled => '',
27                                                 }
28                                 )
29                        ];
30
31 </%init>