Compliance Solutions <http://csilongwood.com/> integration, RT#75262
[freeside.git] / httemplate / elements / tr-part_pkg_freq.html
1 <% include('tr-select.html', @_, 
2              'field'      => 'freq',
3              'options'    => \@freq,
4              'labels'     => \%freq,
5              'curr_value' => $curr_value,
6           )
7 %>
8 <%init>
9
10 my %opt = @_;
11
12 my $curr_value = $opt{'curr_value'} || $opt{'freq'};
13
14 tie my %freq, 'Tie::IxHash', %{FS::part_pkg->freqs_href()};
15 if ( dbdef->table('part_pkg')->column('freq')->type =~ /(int)/i ) {
16   delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq;
17 }
18
19 my @freq = keys %freq;
20 @freq = grep { /^\d+$/ } @freq
21   if $opt{'month_increments_only'};
22 #   if exists($plans{$layer}->{'freq'}) && $plans{$layer}->{'freq'} eq 'm';
23
24 </%init>