RT 77532 - added contact phone numbers to advanced customer report
[freeside.git] / httemplate / elements / tr-select-cust-fields.html
1 <TR>
2   <TD ALIGN="right"><% $opt{'label'} || 'Customer fields' %></TD>
3   <TD>
4     <% include( '/elements/select-cust-fields.html', $cust_fields, %opt ) %>
5   </TD>
6 </TR>
7 <%init>
8
9 my( $cust_fields, %opt ) = @_;
10
11 my @fields = FS::ConfDefaults->cust_fields_avail();
12 my $contact_phone_list;
13 foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
14   $contact_phone_list .= " | Contact ".$phone_type->typename." phone(s)";
15 }
16 @fields = map {s/\| Contact phone\(s\)/$contact_phone_list/g; $_; } @fields;
17
18 $opt{'avail_fields'} ||= [ @fields ];
19
20 </%init>