X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fpart_pkg.cgi;h=97ae4e7ee0ae5975bfe52c573d329d3313a713c2;hb=25130cc2e205c1d2c31fc9a14135148b5b2aa835;hp=019224c4ef76e94c6ee17dbb8b21be57f31f3434;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 019224c4e..97ae4e7ee 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -103,7 +103,7 @@ my $args_callback = sub { $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; } @@ -131,7 +131,7 @@ my $args_callback = sub { 'custnum_ref' => \$custnum; } - warn "args: ".join('/', @args). "\n"; + #warn "args: ".join('/', @args). "\n"; @args; @@ -160,6 +160,12 @@ my @process_m2m = ( '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',