correct package editor when taxproducts off
[freeside.git] / httemplate / edit / part_pkg.cgi
index 3968c89..ccce830 100755 (executable)
                                            },
                                 layer_fields => \%taxproduct_fields,
                                 layer_values_callback => $taxproduct_values,
+                                layers_only  =>   !$taxproducts,
+                                cell_style   => ( !$taxproducts
+                                                  ? 'display:none'
+                                                  : ''
+                                                ),
                               },
 
                               { type  => 'tablebreak-tr-title',
@@ -167,6 +172,9 @@ die "access denied"
       || $curuser->access_right('Edit global package definitions')
       || ( $cgi->param('pkgnum') && $curuser->access_right('Customize customer package') );
 
+my $conf = new FS::Conf;
+my $taxproducts = $conf->exists('enable_taxproducts');
+
 #XXX
 # - tr-part_pkg_freq: month_increments_only (from price plans)
 # - test cloning