RT 77532 - added contact phone numbers to advanced customer report
[freeside.git] / httemplate / elements / select-cust-fields.html
1 <%init>
2   my( $cust_fields, %opt ) = @_;
3
4   my @fields = FS::ConfDefaults->cust_fields_avail();
5   my $contact_phone_list;
6   foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
7     $contact_phone_list .= " | Contact ".$phone_type->typename." phone(s)";
8   }
9   @fields = map {s/\| Contact phone\(s\)/$contact_phone_list/g; $_; } @fields;
10
11   $opt{'avail_fields'} ||= [ @fields ];
12
13   tie my %hash, 'Tie::IxHash', @{ $opt{'avail_fields'} };
14 </%init>
15
16 <SELECT NAME="cust_fields">
17
18   <OPTION VALUE="">(configured default)
19
20 % foreach my $value ( keys %hash ) { 
21   <OPTION VALUE="<% $value %>"><% $hash{$value} %>
22 % } 
23
24
25 </SELECT>
26