From 3f77bb21dfb560a6a91d828f7af9844f80d0d914 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 5 Sep 2013 14:49:32 -0700 Subject: move a2billing tariff and prepaid options to package def, #24572, #24574 --- httemplate/edit/part_pkg.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_pkg.cgi') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 7e67c833a..7f8a70710 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -888,11 +888,16 @@ my $html_bottom = sub { foreach my $field ( grep $_ !~ /^(setup|recur)_fee$/, @fields ) { - if(!exists($href->{$field})) { + if(!exists($href->{$field})) { # shouldn't happen warn "nonexistent part_pkg option: '$field'\n"; next; } + if ( exists($href->{$field}->{display_if}) ) { + my %args = ( 'plan' => $layer ); # anything else? + my $display = &{ $href->{$field}->{display_if} }(%args); + next if !$display; + } $html .= ''. $href->{$field}{'name'}. ''; -- cgit v1.2.1