From 311c04a5c63df131c6c5d74568c9e426f73955eb Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 13 Apr 2008 02:55:44 +0000 Subject: [PATCH] add an element for selecting part_pkg frequencies --- httemplate/elements/tr-part_pkg_freq.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 httemplate/elements/tr-part_pkg_freq.html diff --git a/httemplate/elements/tr-part_pkg_freq.html b/httemplate/elements/tr-part_pkg_freq.html new file mode 100644 index 000000000..98b7da5a5 --- /dev/null +++ b/httemplate/elements/tr-part_pkg_freq.html @@ -0,0 +1,29 @@ +<% include('tr-td-label.html', @_ ) %> + + + + + + + +<%init> + +my %opt = @_; + +my $curr_value = $opt{'curr_value'} || $opt{'freq'}; + +tie my %freq, 'Tie::IxHash', %{FS::part_pkg->freqs_href()}; +if ( dbdef->table('part_pkg')->column('freq')->type =~ /(int)/i ) { + delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq; +} + +my @freq = keys %freq; +@freq = grep { /^\d+$/ } @freq + if $opt{'month_increments_only'}; +# if exists($plans{$layer}->{'freq'}) && $plans{$layer}->{'freq'} eq 'm'; + + -- 2.11.0