% 'disabled' => $f->{'disabled'},
% );
%
+% #selectlayers, others?
+% $include_common{$_} = $f->{$_}
+% foreach grep exists($f->{$_}),
+% qw( js_only html_only select_only layers_only cell_style);
+%
% #select-*
% $include_common{$_} = $f->{$_}
% foreach grep exists($f->{$_}), qw( empty_label );
% 'object' => $object,
% 'cgi' => $cgi,
% 'onchange' => $onchange,
-% 'cell_style' => ( $fieldnum ? 'border-top:1px solid black' : '' ),
+% ( $fieldnum ? ('cell_style' => 'border-top:1px solid black') : () ),
% );
<% include( @include ) %>
},
layer_fields => \%taxproduct_fields,
layer_values_callback => $taxproduct_values,
+ layers_only => !$taxproducts,
+ cell_style => ( !$taxproducts
+ ? 'display:none'
+ : ''
+ ),
},
{ type => 'tablebreak-tr-title',
|| $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
<%init>
-my $conf = new FS::conf;
+my $conf = new FS::Conf;
my %opt = @_;
my $cell_style = $opt{'cell_style'}? 'STYLE="'. $opt{cell_style}. '"' : '';
-my $name = $opt{name} || 'tax_override';
+my $name = $opt{element_name} || $opt{field} || 'tax_override';
</%init>
<%init>
-my $conf = new FS::conf;
+my $conf = new FS::Conf;
my %opt = @_;
my $cell_style = $opt{cell_style} ? 'STYLE="'. $opt{cell_style}. '"' : '';
-my $name = $opt{name} || 'taxproductnum';
+my $name = $opt{element_name} || $opt{field} || 'taxproductnum';
</%init>