summaryrefslogtreecommitdiff
path: root/httemplate/edit/part_pkg.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/part_pkg.cgi')
-rwxr-xr-xhttemplate/edit/part_pkg.cgi7
1 files changed, 6 insertions, 1 deletions
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 .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD>';