diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/elements/tr-selectmultiple-part_pkg.html | 23 | ||||
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 8 | ||||
-rwxr-xr-x | httemplate/search/report_cust_pkg.html | 2 |
3 files changed, 32 insertions, 1 deletions
diff --git a/httemplate/elements/tr-selectmultiple-part_pkg.html b/httemplate/elements/tr-selectmultiple-part_pkg.html new file mode 100644 index 000000000..abf96d726 --- /dev/null +++ b/httemplate/elements/tr-selectmultiple-part_pkg.html @@ -0,0 +1,23 @@ +% +% my( $cust_fields, %opt ) = @_; +% +% use FS::ConfDefaults; +% $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ]; +% +% + + +<TR> + <TD ALIGN="right"><% $opt{'label'} || 'Packages' %></TD> + <TD> + <% include( '/elements/select-table.html', + 'table' => 'part_pkg', + 'name_col' => 'pkg', + 'value' => '', + 'empty_label' => '(none)', + 'element_etc' => 'multiple', + %opt, + ) + %> + </TD> +</TR> diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 8dbc600e9..7a651c4bf 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -80,6 +80,14 @@ %#eslaf % %### +%# parse part_pkg +%### +% +%my $pkgpart = join (' OR pkgpart=', +% grep {$_} map { /^(\d+)$/; } ($cgi->param('pkgpart'))); +%push @where, '(pkgpart=' . $pkgpart . ')' if $pkgpart; +% +%### %# parse magic, legacy, etc. %### % diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index 8fabf107a..2193cac8b 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -18,7 +18,7 @@ 'empty_label' => '(empty class)', ) %> -% #include( '/elements/tr-selectmultiple-part_pkg.html' ) + <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %> <TR> <TD ALIGN="right" VALIGN="center">Next bill date</TD> |