projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a per-package disable_line_item_date_ranges option, RT13200
[freeside.git]
/
httemplate
/
edit
/
process
/
part_pkg.cgi
diff --git
a/httemplate/edit/process/part_pkg.cgi
b/httemplate/edit/process/part_pkg.cgi
index
019224c
..
b4d2eb9
100755
(executable)
--- a/
httemplate/edit/process/part_pkg.cgi
+++ b/
httemplate/edit/process/part_pkg.cgi
@@
-103,13
+103,13
@@
my $args_callback = sub {
$options{"usage_taxproductnum_$_"} = $value;
}
$options{"usage_taxproductnum_$_"} = $value;
}
- foreach ( $cgi->param('report_option') ) {
+ foreach (
grep $_,
$cgi->param('report_option') ) {
$error ||= "Illegal optional report class: $_" unless ( $_ =~ /^\d*$/ );
$options{"report_option_$_"} = 1;
}
$options{$_} = scalar( $cgi->param($_) )
$error ||= "Illegal optional report class: $_" unless ( $_ =~ /^\d*$/ );
$options{"report_option_$_"} = 1;
}
$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;
push @args, 'options' => \%options;
@@
-117,11
+117,11
@@
my $args_callback = sub {
#pkg_svc
###
#pkg_svc
###
- my
%pkg_svc = map { $_ => scalar($cgi->param("pkg_svc$_")) }
- map { $_->svcpart }
-
qsearch('part_svc', {} )
;
+ my
@svcparts = map { $_->svcpart } qsearch('part_svc', {});
+ my %pkg_svc = map { $_ => scalar($cgi->param("pkg_svc$_")) } @svcparts;
+
my %hidden_svc = map { $_ => scalar($cgi->param("hidden$_")) } @svcparts
;
- push @args, 'pkg_svc' => \%pkg_svc;
+ push @args, 'pkg_svc' => \%pkg_svc
, 'hidden_svc' => \%hidden_svc
;
###
# cust_pkg and custnum_ref (inserts only)
###
# cust_pkg and custnum_ref (inserts only)
@@
-131,7
+131,7
@@
my $args_callback = sub {
'custnum_ref' => \$custnum;
}
'custnum_ref' => \$custnum;
}
- warn "args: ".join('/', @args). "\n";
+
#
warn "args: ".join('/', @args). "\n";
@args;
@args;
@@
-160,6
+160,12
@@
my @process_m2m = (
'target_table' => 'tax_class',
'params' => \@tax_overrides,
},
'target_table' => 'tax_class',
'params' => \@tax_overrides,
},
+ { 'link_table' => 'part_pkg_discount',
+ 'target_table' => 'discount',
+ 'params' => [ map $cgi->param($_),
+ grep /^discountnum/, $cgi->param
+ ],
+ },
{ 'link_table' => 'part_pkg_link',
'target_table' => 'part_pkg',
'base_field' => 'src_pkgpart',
{ 'link_table' => 'part_pkg_link',
'target_table' => 'part_pkg',
'base_field' => 'src_pkgpart',