projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add disable_tollfree option
[freeside.git]
/
httemplate
/
edit
/
part_pkg.cgi
diff --git
a/httemplate/edit/part_pkg.cgi
b/httemplate/edit/part_pkg.cgi
index
3968c89
..
db706ab
100755
(executable)
--- a/
httemplate/edit/part_pkg.cgi
+++ b/
httemplate/edit/part_pkg.cgi
@@
-97,6
+97,11
@@
},
layer_fields => \%taxproduct_fields,
layer_values_callback => $taxproduct_values,
},
layer_fields => \%taxproduct_fields,
layer_values_callback => $taxproduct_values,
+ layers_only => !$taxproducts,
+ cell_style => ( !$taxproducts
+ ? 'display:none'
+ : ''
+ ),
},
{ type => 'tablebreak-tr-title',
},
{ 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') );
|| $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
#XXX
# - tr-part_pkg_freq: month_increments_only (from price plans)
# - test cloning
@@
-252,6
+260,7
@@
my $new_object_callback = sub {
%options = $clone_part_pkg->options;
$part_pkg->set($_ => $options{$_})
foreach (qw( setup_fee recur_fee ));
%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')
} else {
$part_pkg = FS::part_pkg->new( $hashref );
$part_pkg->set($_ => '0')