X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill_pkg.cgi;h=61093d262685c61e6ec2c541b2b0d1812ddec14e;hb=5b670255328fbe875196e16bc8dfc57771753e90;hp=d86641de392a9c451722e18e52cc16875af130e4;hpb=ac01b85bf09d058d3cda097dffbf4e8fce5f4305;p=freeside.git diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi index d86641de3..61093d262 100644 --- a/httemplate/search/cust_bill_pkg.cgi +++ b/httemplate/search/cust_bill_pkg.cgi @@ -49,8 +49,9 @@ @currency, 'invnum', '_date', - #'pay_amount', - #'credit_amount', + '', #'pay_amount', + '', #'credit_amount', + FS::UI::Web::cust_sort_fields(), ], 'links' => [ @pkgnum_null, @@ -310,7 +311,9 @@ my $join_pkg = LEFT JOIN part_pkg USING (pkgpart)'; my $part_pkg = 'part_pkg'; -if ( $cgi->param('use_override') ) { #"Separate sub-packages from parents" +# "Separate sub-packages from parents" +my $use_override = $cgi->param('use_override') ? 1 : 0; +if ( $use_override ) { # still need the real part_pkg for tax applicability, # so alias this one $join_pkg .= " LEFT JOIN part_pkg AS override ON ( @@ -341,14 +344,16 @@ if ( $cgi->param('nottax') ) { } if ( grep { $_ eq 'report_optionnum' } $cgi->param ) { - my @nums = grep /^\w+$/, $cgi->param('report_optionnum'); - my $num = join(',', @nums); + my $num = join(',', grep /^[\d,]+$/, $cgi->param('report_optionnum')); + my $not_num = join(',', grep /^[\d,]+$/, $cgi->param('not_report_optionnum')); + my $all = $cgi->param('all_report_options') ? 1 : 0; push @where, # code reuse FTW - FS::Report::Table->with_report_option( $num, $cgi->param('use_override')); - } - - if ( $cgi->param('report_optionnum') =~ /^(\w+)$/ ) { - ; + FS::Report::Table->with_report_option( + report_optionnum => $num, + not_report_optionnum => $not_num, + use_override => $use_override, + all_report_options => $all, + ); } # taxclass