diff options
author | levinse <levinse> | 2011-07-07 17:00:56 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-07-07 17:00:56 +0000 |
commit | 3f8dd846e92d44fc461d91d5fd5e012a770370d1 (patch) | |
tree | dbd5046c7639ab467df9d62358bb3ff1b3644cd3 /httemplate | |
parent | c256a84f9f9e32f6951af61da0c522a75723ef97 (diff) |
add a per-package disable_line_item_date_ranges option, RT13200
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 11 | ||||
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 271fe0915..d36fac660 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -38,6 +38,7 @@ 'taxproduct_select'=> 'Tax products', 'plan' => 'Price plan', 'disabled' => 'Disable new orders', + 'disable_line_item_date_ranges' => 'Disable line item date ranges', 'setup_cost' => 'Setup cost', 'recur_cost' => 'Recur cost', 'pay_weight' => 'Payment weight', @@ -88,6 +89,7 @@ : () ), {field=>'disabled', type=>$disabled_type, value=>'Y'}, + {field=>'disable_line_item_date_ranges', type=>$disabled_type, value=>'Y'}, { type => 'tablebreak-tr-title', value => 'Pricing', #better name? @@ -369,9 +371,8 @@ my $error_callback = sub { } @options; - #$cgi->param($_, $options{$_}) foreach (qw( setup_fee recur_fee )); $object->set($_ => scalar($cgi->param($_)) ) - foreach (qw( setup_fee recur_fee )); + foreach (qw( setup_fee recur_fee disable_line_item_date_ranges )); $pkgpart = $object->pkgpart; @@ -384,7 +385,7 @@ my $new_object_callback = sub { my $part_pkg = FS::part_pkg->new( $hashref ); $part_pkg->set($_ => '0') - foreach (qw( setup_fee recur_fee )); + foreach (qw( setup_fee recur_fee disable_line_item_date_ranges )); $part_pkg; @@ -422,7 +423,7 @@ my $edit_callback = sub { %options = $object->options; $object->set($_ => $object->option($_)) - foreach (qw( setup_fee recur_fee )); + foreach (qw( setup_fee recur_fee disable_line_item_date_ranges )); $pkgpart = $object->pkgpart; @@ -468,7 +469,7 @@ my $clone_callback = sub { %options = $object->options; $object->set($_ => $options{$_}) - foreach (qw( setup_fee recur_fee )); + foreach (qw( setup_fee recur_fee disable_line_item_date_ranges )); $recur_disabled = $object->freq ? 0 : 1; }; diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 27f07e617..c388676df 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -109,7 +109,7 @@ my $args_callback = sub { } $options{$_} = scalar( $cgi->param($_) ) - for (qw( setup_fee recur_fee )); + for (qw( setup_fee recur_fee disable_line_item_date_ranges )); push @args, 'options' => \%options; |