summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-16 16:24:12 -0700
committerMark Wells <mark@freeside.biz>2013-07-16 16:24:12 -0700
commitd0fcbc3d04250ec54cb5dea7abcc58d1f45d78b1 (patch)
treebd28375a339b23eba15f85b67b6c174d81bdbf67 /httemplate/search
parent3289bfbbc1196f383f98db8365d2444f96a5e4ef (diff)
sales report: filter/breakdown by package report class, #24002
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/cust_bill_pkg.cgi12
1 files changed, 12 insertions, 0 deletions
diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index 7d9172aca..bf73d74bd 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -131,6 +131,10 @@ Filtering parameters:
- classnum: Filter on package class.
+- report_optionnum: Filter on package report class. Can be a single report
+ class number, a comma-separated list, the word "multiple", or an empty
+ string (for "no report class").
+
- use_override: Apply "classnum" and "taxclass" filtering based on the
override (bundle) pkgpart, rather than always using the true pkgpart.
@@ -331,6 +335,14 @@ if ( $cgi->param('nottax') ) {
push @where, "COALESCE($part_pkg.classnum, 0) = $1";
}
+ if ( $cgi->param('report_optionnum') =~ /^(\w+)$/ ) {
+ # code reuse FTW
+ my $num = $1;
+ push @where,
+ FS::Report::Table->with_report_option( $1, $cgi->param('use_override') )
+ ;
+ }
+
# taxclass
if ( $cgi->param('taxclassNULL') ) {
# a little different from 'taxclass' in that it applies to the