{ type => 'columnstart' },
- {field=>'pkg', type=>'text', size=>40 }, #32
+ { field => 'pkg',
+ type => 'text',
+ size => 40, #32
+ maxlength => 50,
+ },
{field=>'comment', type=>'text', size=>40 }, #32
{field=>'classnum', type=>'select-pkg_class' },
{field=>'disabled', type=>'checkbox', value=>'Y'},
},
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
%options = $clone_part_pkg->options;
$part_pkg->set($_ => $options{$_})
foreach (qw( setup_fee recur_fee ));
+ $recur_disabled = $part_pkg->freq ? 0 : 1;
} else {
$part_pkg = FS::part_pkg->new( $hashref );
$part_pkg->set($_ => '0')